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

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

Open
afercia opened this issue May 14, 2024 · 1 comment
Open
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Regression Related to a regression in the latest release

Comments

@afercia
Copy link
Contributor

afercia commented May 14, 2024

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

@afercia afercia added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Regression Related to a regression in the latest release [Feature] Widgets Screen The block-based screen that replaced widgets.php. labels May 14, 2024
@afercia afercia 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 May 15, 2024
@afercia
Copy link
Contributor Author

afercia commented May 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

No branches or pull requests

1 participant