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>).

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.

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