Skip to content

Widgets page and Customizer: The inserter should not use ARIA tabs semantics #61653

Open

Description

@afercia

Description

In the Widgets page, the Inserter doesn't need tabs because it is only supposed to show the 'Blocks' panel.

#61510 hid the entire panel header via CSS. The panel header contains the wrapper with role="tablist" that contains the 3 role="tab" panels. They're now hidden with display: none which makes them not perceivable by assistive technology. However, the panel with blocks still use a role="tabpanel", which is not associated with any 'tab'. As such, the ARIA tabs pattern is semantically broken.

Instead of using CSS, the inserter in the Widgets page should render a dirrerent UI that doesn't use the ARIA tabs pattern in the first palce, as it was before the latest changes to reunify the editor.

Cc @youknowriad @MaggieCabrera @scruffian

Step-by-step reproduction instructions

  • Activate Twenty Twenty-One.
  • Go to Appearance > Widgets.
  • Open the main inserter.
  • Observe the main inserter doesn't have tabs (they are hidden via CSS together with the whole panel header).
  • Inspect the source via your browser dev tools.
  • Obaserve the panel element with class block-editor-inserter__tabpanel still has a role="tabpanel" attribute.

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

Activity

  1. added
    [Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).
    [Feature] InserterThe main way to insert blocks using the + button in the editing interface
    [Type] RegressionRelated to a regression in the latest release
    [Feature] Widgets ScreenThe block-based screen that replaced widgets.php.
    on May 14, 2024
  2. changed the title [-]Widgets page: The inserter should not use ARIA tabs semantics[/-] [+]Widgets page and Customizer: The inserter should not use ARIA tabs semantics[/+] on May 15, 2024
  3. afercia commented on May 15, 2024

    @afercia
    ContributorAuthor

    I updated this issue title to include the Customizer.

    After latest changes, the 'inserter' panel in Customize > Widgets shows 3 tabs, including Patterns and Media. It is expected to only show the Blocks panel.

    Also, after #61421 the panel now has two 'Close' buttons. Screenshot:

    On latest trunk:

    trunk

    On WordPress 6.5:

    wp 6 5

    As mentioned above, the unnecessary tabs can't be hidden with CSS. Instead, the panel should render a UI that doesn't use ARIA tabs.

  4. Rishit30G commented on Mar 20, 2025

    @Rishit30G
    Contributor

    Thanks for sharing the issue,

    Also, after #61421 the panel now has two 'Close' buttons.

    I could also identify that the second cross button doesn't work, sharing a screencast for the same:

    Screen.Recording.2025-03-20.at.4.35.36.PM.mov

    Would it be a good idea to remove it from here, will need to check it's dependency 🤔

    https://github.com/WordPress/gutenberg/blob/c30b8c233fe90937b45c0e36ad6a213ed185878d/packages/block-editor/src/components/tabbed-sidebar/index.js#L69C1-L75C8

  5. sarthaknagoshe2002 commented on May 15, 2025

    @sarthaknagoshe2002
    Contributor

    I was not able to reproduce this issue any more.
    can someone could also get this re-checked.

  6. Infinite-Null commented on May 15, 2025

    @Infinite-Null
    Contributor

    Hi @sarthaknagoshe2002 I was able to reproduce the issue:

    Screen.Recording.2025-05-15.at.5.54.15.PM.mov
  7. Infinite-Null commented on May 15, 2025

    @Infinite-Null
    Contributor

    My Bad, I gave the wrong recording! I have updated the above comment!

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

    [Feature] InserterThe main way to insert blocks using the + button in the editing interface[Feature] Widgets ScreenThe block-based screen that replaced widgets.php.[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] RegressionRelated to a regression in the latest release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions