tab-name-present
Tabs have an accessible name
automaticWCAG 4.1.2 (A)confidence: highseverity: seriousrobust
Checks that elements with role="tab" expose a non-empty accessible name.
Applies to. Applies to elements carrying role="tab" (the attribute must name that role alone, not a fallback list) that are included in the accessibility tree. An element with the matching implicit role but no role attribute is out of scope.
Expectation. The element has a non-empty accessible name from aria-label, from an aria-labelledby that resolves to non-empty text, from title, or, role="tab" being name-from-content, from its own subtree text, where a descendant's own name (an <img alt>, aria-label or title) counts as that descendant's contribution rather than only its text nodes.
Examples
pass
<div role="tab" tabindex="0">Apple</div>
Visible text content names the tab.
fail
<div role="tab" tabindex="0"></div>
No name and no content.