presentational-children-focusable-absent

Roles with presentational children must not contain focusable content

automaticWCAG 4.1.2 (A)confidence: highseverity: seriousrobust

Checks that an element whose role makes its children presentational (button, checkbox, img, option, radio, slider, switch, tab, ...) contains no descendant that takes a tab stop.

Applies to. Applies to elements whose semantic role is one of the WAI-ARIA roles defined as having presentational children (button, checkbox, img, menuitemcheckbox, menuitemradio, meter, option, progressbar, radio, scrollbar, separator, slider, switch, tab, plus doc-pagebreak and graphics-symbol from the DPUB-ARIA/Graphics-ARIA modules, which inherit the same trait). The role can be explicit (role="tab") or native (<button>, <meter>, <progress>, <option>). A custom element whose ElementInternals give it one of those roles (this.attachInternals().role), with no role attribute naming another, counts as a native element with that role does.

Expectation. No descendant of the element is part of sequential focus navigation. The presentational-children mechanism removes every descendant from the accessibility tree, so a descendant that still takes a tab stop receives focus with no role and no name to announce.

What a finding reports.

  • role: the role that makes the element's children presentational.
  • focusableElements: the tag name of each tab stop found inside the element, one item per tab stop, in document order.

These data.details fields help to read and reproduce a finding. Apart from reasonCode and the few fields Output schema names as stable, they are not a stable contract: a field may be renamed or dropped in a minor release, so don’t build on them.

Examples

pass
<button>Save</button>

No presentational content that also happens to be focusable.

fail
<button>
Save
<span role="button" aria-label="save options" aria-expanded="false" tabindex="0">▼</span>
</button>

The nested <span> carries its own interactive role and tab stop inside the button's presentational content.

View source