diff --git a/Libraries/LibWeb/ARIA/AriaRoles.json b/Libraries/LibWeb/ARIA/AriaRoles.json index e3af331929d..93f423cb12d 100644 --- a/Libraries/LibWeb/ARIA/AriaRoles.json +++ b/Libraries/LibWeb/ARIA/AriaRoles.json @@ -2046,6 +2046,48 @@ "childrenArePresentational": false, "implicitValueForRole": {} }, + "Suggestion": { + "specLink": "https://w3c.github.io/aria/#suggestion", + "description": "A single proposed change to content.", + "superClassRoles": [ + "Section" + ], + "supportedStates": [ + "aria-busy", + "aria-current", + "aria-errormessage", + "aria-grabbed", + "aria-haspopup", + "aria-hidden", + "aria-invalid" + ], + "supportedProperties": [ + "aria-atomic", + "aria-brailleroledescription", + "aria-controls", + "aria-describedby", + "aria-description", + "aria-details", + "aria-dropeffect", + "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": {} + }, "Superscript": { "specLink": "https://www.w3.org/TR/wai-aria-1.2/#superscript", "description": "One or more superscripted characters. See related superscript.", diff --git a/Libraries/LibWeb/ARIA/RoleType.cpp b/Libraries/LibWeb/ARIA/RoleType.cpp index ccf32da5e13..c6e888e4139 100644 --- a/Libraries/LibWeb/ARIA/RoleType.cpp +++ b/Libraries/LibWeb/ARIA/RoleType.cpp @@ -293,6 +293,8 @@ ErrorOr> RoleType::build_role_object(Role role, bool foc return adopt_nonnull_own_or_enomem(new (nothrow) Strong(data)); case Role::subscript: return adopt_nonnull_own_or_enomem(new (nothrow) Subscript(data)); + case Role::suggestion: + return adopt_nonnull_own_or_enomem(new (nothrow) Suggestion(data)); case Role::superscript: return adopt_nonnull_own_or_enomem(new (nothrow) Superscript(data)); case Role::switch_: diff --git a/Libraries/LibWeb/ARIA/Roles.cpp b/Libraries/LibWeb/ARIA/Roles.cpp index 4030acd960d..a1fa17c79e7 100644 --- a/Libraries/LibWeb/ARIA/Roles.cpp +++ b/Libraries/LibWeb/ARIA/Roles.cpp @@ -131,6 +131,7 @@ bool is_document_structure_role(Role role) Role::separator, // TODO: Only when not focusable Role::strong, Role::subscript, + Role::suggestion, Role::superscript, Role::table, Role::term, diff --git a/Libraries/LibWeb/ARIA/Roles.h b/Libraries/LibWeb/ARIA/Roles.h index b8562d25608..ac3e4f49829 100644 --- a/Libraries/LibWeb/ARIA/Roles.h +++ b/Libraries/LibWeb/ARIA/Roles.h @@ -89,6 +89,7 @@ namespace Web::ARIA { __ENUMERATE_ARIA_ROLE(strong) \ __ENUMERATE_ARIA_ROLE(structure) \ __ENUMERATE_ARIA_ROLE(subscript) \ + __ENUMERATE_ARIA_ROLE(suggestion) \ __ENUMERATE_ARIA_ROLE(superscript) \ __ENUMERATE_ARIA_ROLE(switch_) \ __ENUMERATE_ARIA_ROLE(tab) \ diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/roles.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/roles.txt index cbed5d0d60e..8afec199864 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/roles.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/roles.txt @@ -2,8 +2,7 @@ Harness status: OK Found 54 tests -53 Pass -1 Fail +54 Pass Pass role: alert Pass role: alertdialog Pass role: application @@ -49,7 +48,7 @@ Pass role: spinbutton Pass role: status Pass role: strong Pass role: subscript -Fail role: suggestion +Pass role: suggestion Pass role: superscript Pass role: switch Pass role: term