Skip to content

Font Library: maintain focus order within nested modal #54431

@colorful-tones

Description

@colorful-tones

Description

When testing the work in #53884 it was found that the focus order sequencing fails within the nested modal.

Basically, the Font Library opens in a modal. You can focus on each font in the library. Once you click or enter into a font in the library, you go into a nested context screen that lists the weight variations of that font: 100, 200, 400, etc.

The issue lies when you enter into a font’s nested context screen. The focus shifts to the first variation’s checkbox, which allows the builder to enable or disable that variant.

However, the first focus should go to the ‘Back’ button, which would take the builder back to the Font Library overview, and then the next focus would be the first checkbox for the first variant.

This was initially discussed in the Make #accessibility channel.

Step-by-step reproduction instructions

I believe the only means to test the Font Library: Frontend [Stage 1] work is by checking out PR #53884 as the work has not been merged yet.

Hopefully, the detailed description (above) will guide users on how to recreate this bug along with the video (below).

Screenshots, screen recording, code snippet

font-library-modal-focus-test.mp4

Proposed actionable items to address this issue

  • The 'Back' button should receive the first focus when entering into the Font Variant Overview. This would allow the user to go back immediately and skip over the variant list altogether.
  • After the 'Back' button is focused the variant checkboxes will receive focus.
  • The variant checkboxes should behave a checkboxes and allow the use of the Space Bar to toggle each on/off.

Environment info

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

    [Feature] Font Library[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions