Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExpansionPanelDetail content should not be focusable when ExpansionPanel is collapsed #15649

Closed
2 tasks done
sarod opened this issue May 10, 2019 · 3 comments
Closed
2 tasks done
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@sarod
Copy link

sarod commented May 10, 2019

Today when an ExpansionPanel is collapsed the content is still focusable by tabbing which leads to a poorly accessible UX.

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

Content of ExpansionPanelDetail should not be focusable when the ExpansionPanel is collapsed.

Current Behavior 😯

Today when an ExpansionPanel is collapsed the content is still focusable by pressing keyboard "tab" key.

Examples 🌈

This can be reproduced on the ExpansionPanel demo https://codesandbox.io/s/l39qxq4pxz where tabbing focuses the panel content like chips and link and button.

Context 🔦

The current behavior does not promote good accessibility by default.
Managing focus could be done by custom code outside the library but that can become cumbersome. And most developer would probably not think of this or not have time to do it (The fact that it's not done in the demo page is a good example of that).

@sarod sarod changed the title ExpansionPanelDetail content should not be focusable when ExpansionPanel is closed ExpansionPanelDetail content should not be focusable when ExpansionPanel is collapsed May 10, 2019
@oliviertassinari oliviertassinari added accessibility a11y component: accordion This is the name of the generic UI component, not the React module! labels May 10, 2019
@eps1lon eps1lon self-assigned this May 10, 2019
@eps1lon
Copy link
Member

eps1lon commented May 10, 2019

The current behavior does not promote good accessibility by default.

Fully agree. We fixed this already in #14465 which is in a working state since @material-ui/core@^4.0.0-alpha.2: https://codesandbox.io/s/3vy63w7kzp

@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists and removed accessibility a11y component: accordion This is the name of the generic UI component, not the React module! labels May 10, 2019
@oliviertassinari
Copy link
Member

oliviertassinari commented May 10, 2019

Nice! So it's a duplicate of #12632.

@sarod
Copy link
Author

sarod commented May 10, 2019

Excellent news I'll close this one then. Thanks again for the tremendous work!

@sarod sarod closed this as completed May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants