-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Adding label/description to BlockEditor/DuotoneControl
#54473
Adding label/description to BlockEditor/DuotoneControl
#54473
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is testing well at a first glance!
@andrewhayward could you merge/rebase in order to solve conflicts and include changes from #54468 ? That way we'll be able to take a final look at this. Thank you!
Also, it looks like similar improvements could be made to the DuotonePicker
in the global styles filters panel and gradient palette's panel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me as well, though I do second @brookewp's question regarding screen readers. I also jump directly to Unset
and see that label when navigating into the Duotone picker.
If I then navigate out of the current group (ctrl + option + shift + uparrow
in VoiceOver, iirc) the actual ColorPicker
is focused by the virtual cursor, and that does read out the correct description. So I suppose for me question would be do we want the virtual cursor to jump right to the first option (i.e. Unset
)? Or to the ColorPicker
itself, to highlight that description initially?
Thanks for the feedback, @brookewp @chad1008.
As @chad1008 pointed out, the description applies to the So...
Good question. Currently, |
…tor_duotonecontrol
Probably a good task to work on as a follow-up (although not urgent). Let's merge this PR in the meantime |
What?
This PR ensures that the main duotone picker found in the image duotone filter panel has an identifying label and relevant description.
Why?
As per #54055, every
DuotonePicker
needs to have an appropriate contextual label.How?
An ID is generated and assigned to the node containing the popup description. This is linked to the
DuotonePicker
with anaria-describedby
props. Additionally, anaria-label
is applied to theDuotonePicker
matching the tooltip display value.The
DuotonePicker
component is updated to accept the additionalaria-describedby
prop. (And, as a bonus, the 'unset' option gets a label.)Testing Instructions
aria-describedby
attribute, and that this points to the descriptionaria-label
attribute