microsoft / fluentui

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.
https://react.fluentui.dev
Other
18.51k stars 2.73k forks source link

[Bug]: A11y: a11y issue (nested-interactive) was detected by FastPass when use Tab with a Button #33163

Closed izkizk8 closed 14 hours ago

izkizk8 commented 6 days ago

Component

TabList

Package version

^9

React version

^18

Environment

no needed

Current Behavior

[nested-interactive] issue was detected by FastPass Image

Expected Behavior

Tab can be rendered as div instead of button <Tab as='div' ... >

Reproduction

https://stackblitz.com/edit/fpgh9r-upbnt6

Steps to reproduce

just open demo then use FastPass

Are you reporting an Accessibility issue?

yes

Suggested severity

High - No workaround

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

smhigley commented 4 days ago

This is not a valid control, and would result in inaccessible UI in multiple ways:

Rendering the Tab as a div will have no effect on the allowed content model (ARIA prohibits buttons or other interactive elements from being children of tabs regardless of the HTML tag used, spec'd here: https://w3c.github.io/aria/#tab).

If you wish to have a "..." menu within a tablist, that "..." would need to be a separate Tab in its own right.

microsoft-github-policy-service[bot] commented 14 hours ago

Because this issue is marked as by design and has not had activity for over 3 days, we're automatically closing it for house-keeping purposes.