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

[Chip] When disabled it still receives focus #35038

Closed
2 tasks done
TheWilks opened this issue Nov 7, 2022 · 7 comments · Fixed by #35065
Closed
2 tasks done

[Chip] When disabled it still receives focus #35038

TheWilks opened this issue Nov 7, 2022 · 7 comments · Fixed by #35065
Assignees
Labels
component: chip This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature

Comments

@TheWilks
Copy link

TheWilks commented Nov 7, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example:

Steps:

  1. Add "disabled" to a deletable chip.
  2. Tab to that chip.
  3. You will notice that Mui-focusVisible. A user can tab to the disabled chip and styles are applied to it.

Current behavior 😯

You will notice that Mui-focusVisible. A user can tab to the disabled chip and styles are applied to it.

Expected behavior 🤔

A user should not be able to tab to a disabled chip.

Context 🔦

have the bug removed so users of assistive tech are not confused.

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
@TheWilks TheWilks added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 7, 2022
@zannager zannager added the component: chip This is the name of the generic UI component, not the React module! label Nov 8, 2022
@sai6855
Copy link
Contributor

sai6855 commented Nov 9, 2022

hey @hbjORbj i see you are assigned to this issue, is it okay if i work on this issue?

@ZeeshanTamboli
Copy link
Member

@sai6855 Please go ahead.

@ZeeshanTamboli ZeeshanTamboli assigned sai6855 and unassigned hbjORbj Nov 9, 2022
@sai6855
Copy link
Contributor

sai6855 commented Nov 9, 2022

Thank you

@sai6855
Copy link
Contributor

sai6855 commented Nov 9, 2022

@ZeeshanTamboli created PR, is there any way to test changed component/file? currently i'm running "yarn test" but it is testing all packages.

@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Nov 9, 2022

@ZeeshanTamboli created PR, is there any way to test changed component/file? currently i'm running "yarn test" but it is testing all packages.

See the test:unit section in Contributing guide to narrow down the tests. You can also use yarn t <filename>. Example in this case: yarn t Chip.test.js

@sai6855
Copy link
Contributor

sai6855 commented Nov 9, 2022

Got it

@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Nov 9, 2022
@ZeeshanTamboli ZeeshanTamboli changed the title Chip - Deletable - When disabled it still receives focus [Chip] When disabled it still receives focus Nov 9, 2022
@ZeeshanTamboli ZeeshanTamboli added enhancement This is not a bug, nor a new feature and removed bug 🐛 Something doesn't work labels Nov 25, 2022
@ZeeshanTamboli
Copy link
Member

@TheWilks In order to avoid breaking changes, we introduced a new prop named skipFocusWhenDisabled in the Chip component in #35065 to disable focus when the chip is disabled. It will be focusable by default. You can use this new prop which will be available in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: chip This is the name of the generic UI component, not the React module! enhancement This is not a bug, nor a new feature
Projects
None yet
5 participants