Skip to main content
Version: v6

A tab without a state attribute was detected

A tab without a state attribute was detected — rule summary
FieldValue
Rule codeManual_Tab_State_Missing
WCAG conformance levelA
WCAG success criterion4.1.2 Name, Role, Value
Must be fixed at sourceNo

Description

Elements that act as tabs and trigger functionality like tabs require an aria-selected attribute that reflects their active state. When the tab is activated, aria-selected should be set to true, and vice versa. Without the aria-selected attribute, the functionality of tabs will not be recognized by screen readers.

How to fix

Add the aria-selected attribute to all tab elements. Set aria-selected="true" for the currently selected tab and aria-selected="false" for all other tabs. Update these values programmatically when tabs are activated.