Skip to content

Error Elements with the '${role}' interactive role must be focusable is incorrect for interactive elements #404

@khrome83

Description

@khrome83

I get the following error - "Elements with the 'tablist' interactive role must be focusable".

<div role="tablist" aria-label="Tabbed Content">
    <button role="tab" aria-selected="true" aria-controls="panel1" id="tab1" >Item 1</button>
    <button role="tab" aria-selected="false" tabindex="-1" aria-controls="panel2" id="tab2" >Item 1</button>
    <button role="tab" aria-selected="false" tabindex="-1" aria-controls="panel3" id="tab3" >Item 1</button>
</div>

The error gets flagged, because the first button does not have a tabindex="0". The tabindex="0" is not needed here because a button is implicit and tab-able.

See https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions