Open afercia opened 1 month ago
I would argue that also from a visual design perspective, the entire tools panel purpose and functionality isn't clear.
Elements options
.Elements
.aria-label="Elements options"
so this is one more mismatch between visible label and accessible name.Elements
via an aria-labelledby="components-menu-group-label-1"
which just adds more confusion.As a user, I'd only understand what this menu is about only after I try to use it and _only if I'm able to notice that new items appear or are removed from the main panel. To me, any UI should be self-explanatory instead of forcing users to 'try and discover' to learn how it works.
Description
Similar to https://github.com/WordPress/gutenberg/issues/65112 and https://github.com/WordPress/gutenberg/issues/65235
In the Tools panel, the aria-label attributes for the elements that are shown / hidden and reset mismatch the visible text. As such, this is a mismatch between vissual label and actual accessible bane that is a barrier for some users.
This kind of mismatch should always be avoided. For example:
H2
.Show H2
orHide and reset H2
.Worth also reminding the label of a control i.e. its accessible name isn not the right place to communicate states or values.
https://github.com/WordPress/gutenberg/blob/b1c96760fee50cc0c885c5a030525cbfad83b0a9/packages/components/src/tools-panel/tools-panel-header/component.tsx#L101-L111
Step-by-step reproduction instructions
H1
,H2
, etc.Show H1
,Show H2
, etc. orHide and reset H1
,Hide and reset H2
, etc. depending on the state.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.