Heading has non-empty accessible name - Failed Example 8
In Heading has non-empty accessible name, Failed Example 8
This h1 element has an explicit role of none. However, the global property aria-label is specified.
Per ARIA 1.3 - presentation role, the aria-label attribute is not allowed on generic/none/presentation roles.
Thus it has a semantic role of heading due to Presentational Roles Conflict Resolution. It has an empty accessible name given by its aria-label attribute and the lack of accessible content to fallback to.
Per ARIA 1.3 - global states and properties, aria-label is a global state except where prohibited and (again), per ARIA 1.3 - presentation role it's prohibited.
Should we remove this failed example from the list?
Giacomo
We're still following ARIA 1.1 in which this example is OK.
But indeed, this is not OK anymore in ARIA 1.2.
aria-label has become prohibited on presentation in ARIA 1.2.
In turn, this means it is not really considered global for it anymore:
The following global states and properties are supported by all roles and by all base markup elements unless otherwise prohibited.
(emphasise mine)
Which in turn means that it does not trigger the presentational role conflict resolution anymore:
If an element has global WAI-ARIA states or properties, user agents MUST ignore the presentation role and expose the element with its implicit role.
Since aria-label is not really global anymore, then the conflict does not triggers…
I suggest we let the ARIA 1.2 committee handle that. This may actually affect quite a few rules where we have examples like this 😖 (and notably #1853 )
https://github.com/w3c/aria/issues/1824
Closing it in light of https://github.com/w3c/aria/issues/1824, the prohibited attribute should still trigger the conflict resolution.