LibWeb: Ignore name-required landmark roles which lack accessible names

This change implements the role-checking requirement from the ARIA spec
at https://w3c.github.io/aria/#document-handling_author-errors_roles
that the “form” and “region” roles are required to have accessible
names — and that if they don’t have accessible names as required, UAs
must treat them as if they’d not been specified at all.
This commit is contained in:
sideshowbarker 2024-12-19 23:34:18 +09:00 committed by Sam Atkins
commit ead3af0163
Notes: github-actions[bot] 2025-01-09 14:09:37 +00:00
7 changed files with 151 additions and 0 deletions

View file

@ -0,0 +1,17 @@
Harness status: OK
Found 12 tests
12 Pass
Pass fallback role w/ region with no label
Pass fallback role w/ region with label
Pass aria 1.1 switch role w/ fallback to aria 1.0 checkbox role
Pass div[role=button] ignoring invalid foo role token
Pass unknown[role=button] ignoring invalid foo role token
Pass button ignoring single invalid role token
Pass button ignoring multiple invalid role tokens
Pass div[role=button] ignoring invalid foo role token including punctuation-contaminated known link role
Pass div[role=button] ignoring invalid unicode diacritics etc on link and group role tokens
Pass div[role=button] ignoring tab char
Pass div[role=button] ignoring line break
Pass div[role=button] ignoring braille whitespace char

View file

@ -0,0 +1,7 @@
Harness status: OK
Found 2 tests
2 Pass
Pass form without label
Pass form with label

View file

@ -0,0 +1,7 @@
Harness status: OK
Found 2 tests
2 Pass
Pass region without label
Pass region with label