cfpb / design-manual

⚠️ THIS REPO IS DEPRECATED ⚠️ A set of design principles and standards for the Consumer Financial Protection Bureau.
https://cfpb.github.io/design-manual/
Creative Commons Zero v1.0 Universal
98 stars 71 forks source link

Buttons: Update hover and focus colors to meet color contrast requirements #603

Closed nataliafitzgerald closed 5 years ago

nataliafitzgerald commented 6 years ago

Buttons: Update hover and focus colors to meet color contrast requirements

Some button states currently do not meet color contrast requirements for accessibility and should be updated:

These include:

Recommendations (some are still works in progress):

Disabled button

Current (Gray #43484e) Recommendation (Dark Gray #d2d3d5)
with shaded subsections without shaded subsections

Primary button

Background color for hover and focus states

Current (Pacific 80 - #4497dc) Recommendation (Dark Pacific - #0050B4)
with shaded subsections without shaded subsections

Destructive button

Background color for hover and focus states

Current (Red 80 - #dd735d) Recommendation (Dark Red - #B63014)
with shaded subsections without shaded subsections
Scotchester commented 6 years ago

18F:

Note: Logos, disabled form fields, and disabled buttons are exempt from [color contrast guidelines] and don't need to be tested for contrast.

(Emphasis added.)

I agree that we should try to achieve them if possible, but if it's impossible to do so while having them visually still look disabled… :man_shrugging:

nataliafitzgerald commented 6 years ago

Yeah, that makes sense @Scotchester. I'm ok with making an exception for the disabled states so that they still maintain their visual meaning (i.e. look disabled).

nataliafitzgerald commented 5 years ago

@Scotchester Here's a mock-up of what we've discussed:

screen shot 2018-10-23 at 2 57 24 pm