Repository navigation
Tools panel: Synced the visible label and accessible name - #68592
im3dabasia wants to merge 6 commits into
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Hi @afercia , When you have a moment, Please review my PR . Looking forward for the feedback. |
@im3dabasia thanks for raising this PR. Once fixed, I guss the snapshots of the failing unit test should be regenerated. You can do that by passing the related flag when running the test, for example:
From a design perspective, the Tools Panel is still unclear to me. |
|
Thank you @afercia for your thoughtful feedback! I really appreciate you explaining the snapshot update process - I've learned something valuable today. I agree with your design feedback about the Tools Panel's lack of clarity. For this PR though, I'm specifically focusing on addressing the accessibility issue where visible and accessible names don't match. I'll fix all the test failures caused by these name changes and regenerate the snapshots as you suggested. The broader UX improvements can be addressed in a separate PR after reaching consensus with the design team. |
4f5c2d8 to
93d7c92
Compare
|
Hey @afercia I have fixed the failing test cases. When you get a chance please review my PR |
|
Why do these need an aria-label when there is a visible text in the button? |
I think you're right - we don't need an However, we may need to do something about the resettable buttons, because the text "Reset" has the |
ramonjd
left a comment
There was a problem hiding this comment.
From a tools panel perspective, this looks good to me.
The items already carry role="menuitemcheckbox" and aria-checked from isSelected, so the shown/hidden state is exposed through the role.
The visible text and the accessible name are now identical.
Probably just needs a rebase.
| ### Bug Fixes | ||
|
|
||
| - `Button`: Remove fixed width from small and compact buttons with icons ([#69378](https://github.com/WordPress/gutenberg/pull/69378)). | ||
| - `ToolsPanel`: Updated the ARIA labels to match the visible text to improve accessibilty ([#68592](https://github.com/WordPress/gutenberg/pull/68592)). |
There was a problem hiding this comment.
| - `ToolsPanel`: Updated the ARIA labels to match the visible text to improve accessibilty ([#68592](https://github.com/WordPress/gutenberg/pull/68592)). | |
| - `ToolsPanel`: Updated the ARIA labels to match the visible text to improve accessibility ([#68592](https://github.com/WordPress/gutenberg/pull/68592)). |
|
Thanks for this one @im3dabasia 👍 From what I can see #84341 has already fixed the mismatch this PR targets. #84341 puts the visible name first, for example "Line height, show" and "Line height, hide and reset". Default items read "Size, reset to default". The name now starts with the visible text, so voice control users can say what they see. This PR conflicts on those same lines. I'll close this one for now. If there's something further you think needs addressing, please feel free to re-open or submit a follow-up issue. |



Fixes: #65241
What?
Updated aria-labels for Tools Panel items to match their visible text.
Why?
Resolved mismatches between visual labels and accessible names, improving accessibility.
How?
Refactored aria-label generation to reflect visible text directly without adding unnecessary text.
Testing Instructions
Screenshots or screencast