department-of-veterans-affairs / vets-design-system-documentation

Repository for design.va.gov website
https://design.va.gov
36 stars 55 forks source link

Experimental Design - improvements to va-button disabled variation #2792

Open andaleliz opened 2 weeks ago

andaleliz commented 2 weeks ago

What

I'm proposing one improvement and one addition to va-button.

  1. Increase the contrast of the background color for the current disabled state to improve accessibility. The current background color doesn't have sufficient contrast ratio against background colors on va.gov (modal variations + standard white page background)
  2. Add a loading variation to va-button to improve consistency across VA.gov and have a variation and guidelines available for teams

Purpose

  1. If we think about "accessibility beyond compliance", we can do better than the current background color and make sure it stands out clearly against all background colors on va.gov.
  2. A loading variation would help users understand when an action they initiated is in progress, and provide context to why the button has entered a disabled state.

Usage

  1. Disabled variation is already part of the design system. This variation is used on VA.gov to communicate loading states, and possibly for other reasons. I didn't fully audit the site to see where disabled buttons may be used, but there are 3 examples here.
  2. Loading buttons/states are already used on VA.gov to communicate when a user-initiated action is in progress. Here are 5 examples of different approaches in use on VA.gov today.

Behavior

  1. Nothing would change about the behavior of the disabled button.
  2. In a loading state, the button variation would change from primary or secondary, to loading; the color of the button would change and an animated loading icon would appear.

Examples

Accessibility

Guidance

I don't think any changes to disabled button guidance would be needed. For the loading variation, I would say:

Other things we considered

Code (optional)

Next steps

If your request is approved, you can add your component or pattern to the system. If you have any questions on how to add your component or pattern to the system, please reach out to the Design System Team at #platform-design-system.