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

[Storybook] Disabled component are still focusable in Firefox #45253

Closed
ciampo opened this issue Oct 24, 2022 · 2 comments · Fixed by #45272
Closed

[Storybook] Disabled component are still focusable in Firefox #45253

ciampo opened this issue Oct 24, 2022 · 2 comments · Fixed by #45272
Labels
Storybook Storybook and its stories for components [Type] Bug An existing feature does not function as intended

Comments

@ciampo
Copy link
Contributor

ciampo commented Oct 24, 2022

Description

This is likely a regression introduced by #44865, which causes the Disabled component to rely on the inert attribute.

The inert attribute is not supported by Firefox browsers, and the polyfill doesn't seem to work in preventing elements wrapped in Disabled from being keyboard-focusable.

What needs to be clarified is whether the polyfill is loaded at all in Storybook — depending on that, this may be either an environment-specific issue, or a Gutenberg-wide problem

Step-by-step reproduction instructions

  1. Visit https://wordpress.github.io/gutenberg/?path=/story/components-disabled--default using the firefox browser
  2. Make sure the isDisabled is set to true
  3. With the keyboard, focus the different input fields

Screenshots, screen recording, code snippet

Kapture.2022-10-24.at.20.32.27.mp4

Environment info

Firefox, MacOS

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@youknowriad
Copy link
Contributor

I confirmed that there's no regression in Firefox, it's just that there's no polyfill (not just the inert one) is actually loaded in storybook.

@ciampo
Copy link
Contributor Author

ciampo commented Oct 25, 2022

Thank you for the confirmation, Riad! I'm going to change the PR's description to better reflect that the issue is only in Storybook.

@ciampo ciampo changed the title Elements wrapped in Disabled component are still focusable in Firefox [Storybook] Disabled component are still focusable in Firefox Oct 25, 2022
@kathrynwp kathrynwp added [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release Storybook Storybook and its stories for components and removed [Type] Regression Related to a regression in the latest release labels Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storybook Storybook and its stories for components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants