Skip to content

Constrain text color choices based on selected background color #30411

Open

Description

What problem does this address?

Currently, users are free to choose text and background colors that do not meet minimum color contrast standards. The editor displays a warning, but this allows the user to make the choice before warning them it would be inaccessible.

What is your proposed solution?

Once the user chooses a background color the editor should hide all inaccessible text color choices and add a "show all colors" button to restore them. A rough mockup:

CleanShot 2021-03-31 at 07 54 15 2

Once the user clicks the "show all colors" button, the editor should display the message explaining why the user's choices were constrained and suggesting they only use recommended colors. Again, a rough mockup:

CleanShot 2021-03-31 at 08 06 20

Additionally, I would suggest adding a setting that allows theme authors to disable the "show all colors" button. This way, themes that are marketed as accessible can make firmer guarantees about accessibility, and users seeking out accessible themes will have fewer avenues available allowing them to inadvertently create accessibility issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions