Support

Account

Home Forums General Issues Color Picker and WCAG rules, displaying the ratio

Unread

Color Picker and WCAG rules, displaying the ratio

  • Hi,

    I’ve setup two color values, one for “color” and one for “background-color” where my client is able to choose a font-color (on white background) and a background-color (with white font-color on top). In the list screen of the custom post type I show both colors and calculate the contrast ratio and check if it fails or passes the WCAG AA level test.

    List view

    But switching between editing the custom post type and the list view back and forth is quite cumbersome.

    What I want to achieve, is testing the color values in the edit screen. Right where the client uses the color picker. I would be happy if this is done at least by saving the post. It must not be live tested with javascript, because this is too much work for something that is not paid nor recommended by the client.

    But I do not know how to add a box with ACF and performing some PHP inside of it 🙂

    Alex

Viewing 1 post (of 1 total)

The topic ‘Color Picker and WCAG rules, displaying the ratio’ is closed to new replies.