3 Comments

  1. Graham Armfield

    Is there an example page anywhere where we can see it in action?

    You mention accessibility in the context of selected colours, but it would be nice to know that effort has been put in to ensure that the control itself is accessible – to keyboard users, voice recognition users, and screen reader users.

    Report

    • Justin Tadlock

      There is no live demo. It took me less than 5 minutes to set up and test. It’s essentially just copying and pasting some code from the instructions.

      On the accessibility of the control itself, that is a good question. Maybe I can get someone from the team to step in and answer that with specifics.

      Report

    • Ari Stathopoulos

      Hello Graham,
      The control uses react-color and therefore has the same issues that script has. All accessibility issues from react-color have already been resolved in the ColorPicker component in WordPress-Core (see https://developer.wordpress.org/block-editor/components/color-picker/), however since rgba support in that component was only recently added, we can’t rely on it. Themes need to support the latest 2 major WP releases, so we’ll need to wait before we can switch to the WordPress component, otherwise themes that implement this control would break on WP 5.0 for example. Nobody wants that…

      That being said, the control has a regular text input above the colorpicker and the control’s label points to that input (I pushed a commit and updated the release a few minutes ago with this tweak).
      So for text-readers and any other assistive technology it shouldn’t really be any different than a text control.
      If I missed something and this is not the case – or if you have any suggestions on how to improve the implementation – please let us know either in a comment here or in the GitHub repository.

      Report

Comments are closed.

%d bloggers like this: