[fix] example custom class button has insufficent color contrast #2607
Labels
a11y
Relates to accessibility standards and practices
good first issue
Good for newcomers
Hacktoberfest
ReactUSWDS Version: 5.4.0 & USWDS Version: 3.6.0
Describe the bug
Our custom class button example in storybook does not have sufficient color contrast. If you're new to storybook, it is a tool we use to display the components for this project and is a part of our documentation. Basic understanding of CSS is all you need to fix this issue, though so no worries if you are new to accessibility or design systems!
To fix this issue, we need to head to go into a stylesheet we have set up for custom storybook examples. In the repo, the path to this file is
.storybook/custom-styles.scss
. You'll need to replace the hex code#fa9441
provided for.custom-class
to a darker color, because right now our orange is too light for the white text to be easily read.In the screenshot above ANDI suggests that
#bf5906
would be a good replacement, but really any dark color will do. I'll go over inExpected behavior
below how to verify you have made a good selection.To Reproduce
Steps to reproduce the behavior:
Go to https://trussworks.github.io/react-uswds/?path=/story/components-button--custom-class
Click on the Open canvas in a new page icon in the top right corner (see image below)
run the accessibility checker of your choice (we like to use ANDI free and very easy to install)
in the ANDI dropdown, select
color contrast
click on the Next Element button to select the button in the ANDI inspector
See error
Expected behavior
In short, the expected behavior is that the button is legible for folks who rely on the visual cue of the button.
If you aren't sure though, you can validate using the automated accessibility checker of your preference, or in ANDI by taking the following steps:
To Reproduce
Next Element
buttonAdditional context
.storybook/custom-styles.scss
The text was updated successfully, but these errors were encountered: