mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Add support for the “mark” ARIA role
This commit is contained in:
parent
96540e9f89
commit
6e24f23aa0
Notes:
github-actions[bot]
2024-12-12 13:15:00 +00:00
Author: https://github.com/sideshowbarker
Commit: 6e24f23aa0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2836
Reviewed-by: https://github.com/trflynn89
4 changed files with 48 additions and 0 deletions
|
@ -3307,6 +3307,48 @@
|
||||||
"childrenArePresentational": false,
|
"childrenArePresentational": false,
|
||||||
"implicitValueForRole": {}
|
"implicitValueForRole": {}
|
||||||
},
|
},
|
||||||
|
"Mark": {
|
||||||
|
"specLink": "https://w3c.github.io/aria/#mark",
|
||||||
|
"description": "Content which is marked or highlighted for reference or notation purposes, due to the content's relevance in the enclosing context.",
|
||||||
|
"superClassRoles": [
|
||||||
|
"Section"
|
||||||
|
],
|
||||||
|
"supportedStates": [
|
||||||
|
"aria-busy",
|
||||||
|
"aria-current",
|
||||||
|
"aria-disabled",
|
||||||
|
"aria-grabbed",
|
||||||
|
"aria-hidden",
|
||||||
|
"aria-invalid"
|
||||||
|
],
|
||||||
|
"supportedProperties": [
|
||||||
|
"aria-atomic",
|
||||||
|
"aria-brailleroledescription",
|
||||||
|
"aria-controls",
|
||||||
|
"aria-describedby",
|
||||||
|
"aria-description",
|
||||||
|
"aria-details",
|
||||||
|
"aria-dropeffect",
|
||||||
|
"aria-errormessage",
|
||||||
|
"aria-flowto",
|
||||||
|
"aria-haspopup",
|
||||||
|
"aria-keyshortcuts",
|
||||||
|
"aria-live",
|
||||||
|
"aria-owns",
|
||||||
|
"aria-relevant",
|
||||||
|
"aria-roledescription"
|
||||||
|
],
|
||||||
|
"requiredStates": [],
|
||||||
|
"requiredProperties": [],
|
||||||
|
"prohibitedStates": [],
|
||||||
|
"prohibitedProperties": [],
|
||||||
|
"requiredContextRoles": [],
|
||||||
|
"requiredOwnedElements": [],
|
||||||
|
"nameFromSource": "Prohibited",
|
||||||
|
"accessibleNameRequired": false,
|
||||||
|
"childrenArePresentational": false,
|
||||||
|
"implicitValueForRole": {}
|
||||||
|
},
|
||||||
"Navigation": {
|
"Navigation": {
|
||||||
"specLink": "https://www.w3.org/TR/wai-aria-1.2/#navigation",
|
"specLink": "https://www.w3.org/TR/wai-aria-1.2/#navigation",
|
||||||
"description": "A landmark containing a collection of navigational elements (usually links) for navigating the document or related documents.",
|
"description": "A landmark containing a collection of navigational elements (usually links) for navigating the document or related documents.",
|
||||||
|
|
|
@ -232,6 +232,8 @@ ErrorOr<NonnullOwnPtr<RoleType>> RoleType::build_role_object(Role role, bool foc
|
||||||
return adopt_nonnull_own_or_enomem(new (nothrow) Main(data));
|
return adopt_nonnull_own_or_enomem(new (nothrow) Main(data));
|
||||||
case Role::marquee:
|
case Role::marquee:
|
||||||
return adopt_nonnull_own_or_enomem(new (nothrow) Marquee(data));
|
return adopt_nonnull_own_or_enomem(new (nothrow) Marquee(data));
|
||||||
|
case Role::mark:
|
||||||
|
return adopt_nonnull_own_or_enomem(new (nothrow) Mark(data));
|
||||||
case Role::math:
|
case Role::math:
|
||||||
return adopt_nonnull_own_or_enomem(new (nothrow) Math(data));
|
return adopt_nonnull_own_or_enomem(new (nothrow) Math(data));
|
||||||
case Role::meter:
|
case Role::meter:
|
||||||
|
|
|
@ -53,6 +53,7 @@ namespace Web::ARIA {
|
||||||
__ENUMERATE_ARIA_ROLE(listitem) \
|
__ENUMERATE_ARIA_ROLE(listitem) \
|
||||||
__ENUMERATE_ARIA_ROLE(log) \
|
__ENUMERATE_ARIA_ROLE(log) \
|
||||||
__ENUMERATE_ARIA_ROLE(main) \
|
__ENUMERATE_ARIA_ROLE(main) \
|
||||||
|
__ENUMERATE_ARIA_ROLE(mark) \
|
||||||
__ENUMERATE_ARIA_ROLE(marquee) \
|
__ENUMERATE_ARIA_ROLE(marquee) \
|
||||||
__ENUMERATE_ARIA_ROLE(math) \
|
__ENUMERATE_ARIA_ROLE(math) \
|
||||||
__ENUMERATE_ARIA_ROLE(meter) \
|
__ENUMERATE_ARIA_ROLE(meter) \
|
||||||
|
|
|
@ -776,6 +776,9 @@ Optional<ARIA::Role> HTMLElement::default_role() const
|
||||||
// https://www.w3.org/TR/html-aria/#el-main
|
// https://www.w3.org/TR/html-aria/#el-main
|
||||||
if (local_name() == TagNames::main)
|
if (local_name() == TagNames::main)
|
||||||
return ARIA::Role::main;
|
return ARIA::Role::main;
|
||||||
|
// https://www.w3.org/TR/html-aria/#el-mark
|
||||||
|
if (local_name() == TagNames::mark)
|
||||||
|
return ARIA::Role::mark;
|
||||||
// https://www.w3.org/TR/html-aria/#el-nav
|
// https://www.w3.org/TR/html-aria/#el-nav
|
||||||
if (local_name() == TagNames::nav)
|
if (local_name() == TagNames::nav)
|
||||||
return ARIA::Role::navigation;
|
return ARIA::Role::navigation;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue