presentation-role-conflict

Presentational role must not conflict with a global ARIA attribute or focusability

manualconfidence: mediumseverity: minorrobust

Checks that role="presentation"/"none" (including an <img alt=""> implicit presentation role) is not combined with a global ARIA attribute (aria-label, aria-hidden, aria-describedby, ...) or focusability (tabindex/native).

Applies to. Applies to elements with an explicit role="presentation" or role="none", OR an <img alt=""> carrying no explicit role of its own (empty alt gives an <img> an implicit presentation role per HTML-AAM, even with no explicit role attribute at all: `img[alt=''], [role="none"], [role="presentation"]`).

Expectation. The element does not also carry a WAI-ARIA *global* state/property (aria-label, aria-hidden, aria-describedby, aria-live, aria-current, ...; the full global-attribute set, not just the naming ones), AND is not focusable. Per the WAI-ARIA spec's Presentational Roles Conflict Resolution section, a presentational role is "restored" to the element's implicit semantic role when either condition holds: the presentation/none role silently stops working, contradicting the author's evident intent to hide the element from the accessibility tree.

Examples

can't tell
<div role="presentation" aria-label="Conflicting">Content</div>

`role="presentation"` asks assistive technology to skip this element, but `aria-label` supplies a name — per WAI-ARIA conflict resolution, the global attribute wins and the presentation role is dropped, so the element (and its name) come back into the tree unexpectedly.

n/a
<div role="presentation">Decorative</div>

No conflicting naming attribute is present alongside the presentation role.

View source