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

A11y: Remove Tooltip usage to prevent unexpected tab stops #68594

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

yogeshbhutkar
Copy link
Contributor

@yogeshbhutkar yogeshbhutkar commented Jan 10, 2025

What, Why and How?

The tooltip wrapper was causing accessibility issues by adding tabindex=0 to non-interactive elements, creating unexpected tab stops during keyboard navigation.

This was fixed by removing the Tooltip component as specified in this comment, and by adding Label to Unit Control component.

Testing Instructions

  1. Select a Paragraph Block.
  2. Navigate to Dimension Settings and check Radius.
  3. Click on Unlink radii.
  4. Try navigating through the input elements, and notice, it now just takes two tabs to traverse through each input.

Screencast

Demo

Closes: #68591

@yogeshbhutkar yogeshbhutkar changed the title Refactor Tooltip component usage in BoxInputControls for improved readability A11y: Remove Tooltip usage to prevent tab breaks Jan 10, 2025
@yogeshbhutkar yogeshbhutkar changed the title A11y: Remove Tooltip usage to prevent tab breaks A11y: Remove Tooltip usage to prevent unexpected tab stops Jan 10, 2025
@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review January 10, 2025 11:34
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: Rishit30G <rishit30g@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor labels Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Border radius control: incorrect usage of Tooltip causes unexpected tab stop
2 participants