Skip to content

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

Closed

Description

@ciampo

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

Activity

  1. youknowriad commented on Oct 25, 2022

    @youknowriad
    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.

  2. ciampo commented on Oct 25, 2022

    @ciampo
    ContributorAuthor

    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.

  3. changed the title [-]Elements wrapped in `Disabled` component are still focusable in Firefox[/-] [+][Storybook] `Disabled` component are still focusable in Firefox[/+] on Oct 25, 2022
  4. added
    [Type] Bug
    [Type] Regression
    Storybook
    and removed
    [Type] Regression
    on Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Storybook[Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions