Skip to content

Make all popovers implement a modal behavior #56077

@afercia

Description

@afercia

Description

Splitting this out from #56042 (comment)

Turns out most of the popovers in the editor UI do implement constrained tabbing but some don't. I'm not sure what the reasoning behing this inconsistent is, but I'd tend to think all the popovers should implement a consistent keyboard interaction, regardless whether the component is 'inline' within the post content or in other parts of the UI.

Step-by-step reproduction instructions

  • Edit a post, select some text and press COmmand+K to add a link to the selected text.
  • A popover open, focus is moved to the link input field.
  • Press the Tab key multiple times
  • Observe that tabbing is constrained within the popover.
  • Add a link and save.
  • Select the linked text.
  • A popover with the Edit link UI appears.
  • Press the Tab key to move within the popover.
  • Move focus to the Edit button (the one with the pencil icon) and press Enter.
  • A popover with the Edti link UI appears.
  • Press the Tab key multiple times.
  • Observe that tabbing is not constrained within the popover.

There may be other instances of popovers where tabbing is not constrained. To me, it seems there is no good reason why popovers should not constrain tabbing. The keyboard interaction should always be the same: predictable and consistent. I'd like to hear thoughts also from @alexstine and @joedolson

Screenshots, screen recording, code snippet

No response

Environment info

No response

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Package] Components/packages/components[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions