Color options (react-color): invalid HTML and accessibility barriers #2383
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Type] Bug
An existing feature does not function as intended
The color picker added for the Button and Cover Text blocks (see #1999 and #2036) produces invalid HTML and is not fully accessible. Actually, the only accessibility feature I see after a first evaluation, is that the color controls are focusable.
It's sad to see UI controls made of
<div>
s and<span>
s being introduced in WordPress. This is really not a step towards a state-of-the-art application. Instead, it's a step backwards.I'm surprised this external library (react-color) has been introduced in Gutenberg without any preliminary, even quick and basic, evaluation for accessibility and web standards. Together with the calendar (react-datepicker, see #1311), it's the second time that this happens and I'm not sure this is the best path to follow in the effort to find a good balance between pretty functionalities and universal access for everyone.
span elements inside div elements...div elements inside span elements...#f78da7
that gets announced, in the best case, as:number f seven eight d a seven group
. The word "group" is added by some screen readers because they don't know what all those divs and spans areFor reference:
The text was updated successfully, but these errors were encountered: