diff --git a/accessible/base/ARIAMap.cpp b/accessible/base/ARIAMap.cpp index 8bdb102002e2..2a0dfd412ae0 100644 --- a/accessible/base/ARIAMap.cpp +++ b/accessible/base/ARIAMap.cpp @@ -1519,7 +1519,8 @@ uint8_t aria::GetFirstValidRoleMapIndexExcluding( // Skip any roles that we aren't interested in. bool shouldSkip = false; for (nsStaticAtom* atomRole : aRolesToSkip) { - if (role.Equals(atomRole->GetUTF16String())) { + if (role.Equals(atomRole->GetUTF16String(), + nsCaseInsensitiveStringComparator)) { shouldSkip = true; break; } diff --git a/accessible/tests/browser/role/browser_computedARIARole.js b/accessible/tests/browser/role/browser_computedARIARole.js index 6cc5e44aae34..f0db12dedbc4 100644 --- a/accessible/tests/browser/role/browser_computedARIARole.js +++ b/accessible/tests/browser/role/browser_computedARIARole.js @@ -19,6 +19,7 @@ addAccessibleTask(
unknown ARIA role
+
unlabelled region with fallback to group, upper case
HTML main
@@ -61,6 +62,12 @@ addAccessibleTask( testComputedARIARole("ariaRowgroup", "rowgroup"); testComputedARIARole("ariaSearchbox", "searchbox"); testComputedARIARole("ariaUnknown", "generic"); + // XXX Ideally, ariaFallbackUpperCase would be tested in + // testing/web-platform/tests/wai-aria/role/fallback-roles.html + // However, it's unclear in the spec whether ARIA roles are intended to be + // case insensitive or not, so we can't reasonably assume that in WPT until + // that's cleared up. See https://github.com/w3c/aria/issues/2548. + testComputedARIARole("ariaFallbackUpperCase", "group"); testComputedARIARole("htmlButton", "button"); // There is only a single ARIA role for buttons, but Gecko uses different // roles depending on states.