WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.54k stars 4.21k forks source link

Ensure appropriate labels are provided for color/gradient picker controls #54055

Open andrewhayward opened 1 year ago

andrewhayward commented 1 year ago

What problem does this address?

Changes introduced in #52255 make it a requirement for the CircularOptionPicker to have an aria-label/-labelledby prop provided, to make sure appropriate context is available for the control. The three consuming components (ColorPalette, DuotonePicker and GradientPicker) all hide this requirement behind a default value, and should transition away from optional ARIA props to requiring a label of some sort.

What is your proposed solution?

All of the higher-order controls that use these three foundational components should be updated to provide a more appropriate and relevant label for their context, passing either an aria-label or aria-labelledby prop.

Acceptance Criteria

andrewhayward commented 1 year ago

Components that use <ColorPalette>:

andrewhayward commented 1 year ago

Components that use <DuotonePicker>:

andrewhayward commented 1 year ago

Components that use <GradientPicker>: