Skip to content

TabNav cannot be properly assigned roles #1622

Closed
@mattcosta7

Description

@mattcosta7

Describe the bug

When using a <TabNav />, no tablist and tab roles are assigned directly.

Due to the implementation, attempting to provide this manually creates invalid aria role semantics, since the rest props of TabNav are applied to the wrapper and not the 'nav' element, while the link roles are applied directly

current jsx => Markup

<TabNav role="tablist"><TabNav.Link role="tab /></TabNav>
=>
<div role="tablist"><nav><a role="tab /></nav></div>

expected

<TabNav role="tablist"><TabNav.Link role="tab /></TabNav>
=>
<div><nav role="tablist"><a role="tab /></nav></div>

or that these are applied by default?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions