diff --git a/Libraries/LibWeb/ARIA/ARIAMixin.cpp b/Libraries/LibWeb/ARIA/ARIAMixin.cpp index ba477beac13..8d03486d394 100644 --- a/Libraries/LibWeb/ARIA/ARIAMixin.cpp +++ b/Libraries/LibWeb/ARIA/ARIAMixin.cpp @@ -28,7 +28,7 @@ Optional ARIAMixin::role_from_role_attribute_value() const auto role = role_from_string(role_name); if (!role.has_value()) continue; - if (is_non_abstract_role(*role)) + if (!is_abstract_role(*role)) return *role; } diff --git a/Libraries/LibWeb/ARIA/Roles.cpp b/Libraries/LibWeb/ARIA/Roles.cpp index a1fa17c79e7..3aa479146c8 100644 --- a/Libraries/LibWeb/ARIA/Roles.cpp +++ b/Libraries/LibWeb/ARIA/Roles.cpp @@ -173,15 +173,6 @@ bool is_windows_role(Role role) Role::dialog); } -bool is_non_abstract_role(Role role) -{ - return is_widget_role(role) - || is_document_structure_role(role) - || is_landmark_role(role) - || is_live_region_role(role) - || is_windows_role(role); -} - // https://www.w3.org/TR/wai-aria-1.2/#namefromcontent bool allows_name_from_content(Role role) { diff --git a/Libraries/LibWeb/ARIA/Roles.h b/Libraries/LibWeb/ARIA/Roles.h index 193fe9ac66c..afcaceb1c31 100644 --- a/Libraries/LibWeb/ARIA/Roles.h +++ b/Libraries/LibWeb/ARIA/Roles.h @@ -128,7 +128,6 @@ bool is_landmark_role(Role); bool is_live_region_role(Role); bool is_windows_role(Role); -bool is_non_abstract_role(Role); bool allows_name_from_content(Role); } diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/contextual-roles.tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/contextual-roles.tentative.txt new file mode 100644 index 00000000000..1e6eb9895bd --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/contextual-roles.tentative.txt @@ -0,0 +1,7 @@ +Harness status: OK + +Found 2 tests + +2 Pass +Pass role is sectionfooter (in main) +Pass role is sectionheader (in main) \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/roles.tentative.txt b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/roles.tentative.txt new file mode 100644 index 00000000000..d97cef9f31a --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/wai-aria/role/roles.tentative.txt @@ -0,0 +1,7 @@ +Harness status: OK + +Found 2 tests + +2 Pass +Pass role: sectionheader +Pass role: sectionfooter \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/contextual-roles.tentative.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/contextual-roles.tentative.html new file mode 100644 index 00000000000..1a0711a06e8 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/contextual-roles.tentative.html @@ -0,0 +1,30 @@ + + + + Tentative: Contextual Role Verification Tests + + + + + + + + + + +
+
x
+
+
+
x
+
+ + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/roles.tentative.html b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/roles.tentative.html new file mode 100644 index 00000000000..592ab92c589 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/wai-aria/role/roles.tentative.html @@ -0,0 +1,31 @@ + + + + New Core ARIA Role Verification Tests + + + + + + + + + +

Tests new ARIA role definitions. See comments for more info.

+ + + +