role
attribute case-sensitivity
#2296
Labels
accessibility support
Accessibility support testing and tracking
role
attribute case-sensitivity
#2296
Accessibility support
role
attributes that are not entirely lowercase are handled inconsistently. Mapping role strings to the browser's internal role constant is done using case-insensitive comparisons in Chrome, Firefox and Safari (e.g.role=main
androle=mAiN
both map toax::mojom::Role::kMain
in Chrome)However browsers also expose an xml-roles attribute which is exposed without lowercasing. So that
role=mAiN
is exposed asxml-roles=mAiN
.That causes problems in AT which have special cases for some
xml-roles
values and usually compare the value case-sensitivelyJAWs has a special case for
xml-roles=alertdialog
https://github.com/chromium/chromium/blob/28472b5d68410c6182cfdf0db09edd484e7a1824/ui/views/accessibility/view_accessibility.cc#L395C66-L395C77
NVDA special-cases
xml-roles
values includingmenu
,banner
,complementary
,contentinfo
,main
,navigation
,search
,form
https://github.com/search?q=repo%3Anvaccess%2Fnvda+xml-roles&type=code
ACT Rules
This support item is used in glossary/explicit-role.md which is used in 18 rules including
https://www.w3.org/WAI/standards-guidelines/act/rules/ff89c9/
https://www.w3.org/WAI/standards-guidelines/act/rules/d0f69e/
Test cases
Test case 1 ...
Open this test case
Test Results
Chrome lowercases role in a11y tree
Safari lowercases role in a11y tree
Firefox lowercases role in a11y tree, but has a mixed-cased
xml-roles
attribute in accessibility inspectorThe text was updated successfully, but these errors were encountered: