Skip to content
This repository has been archived by the owner on Mar 5, 2018. It is now read-only.

Button contrast and visual marker changes #391

Closed
jonathanconway opened this issue Sep 29, 2016 · 7 comments
Closed

Button contrast and visual marker changes #391

jonathanconway opened this issue Sep 29, 2016 · 7 comments

Comments

@jonathanconway
Copy link
Contributor

jonathanconway commented Sep 29, 2016

At the moment colour is the only way of visually distinguishing a focussed button from a non-focussed button.

From tracing back the variables, it seems like there is at most a 10% colour difference (in terms of lightness) between regular button state and hover button state.

See below:

image

Should we either increase the contrast or add an additional visual marker of focused-ness, e.g. a border?

image

@klepas
Copy link
Contributor

klepas commented Oct 4, 2016

Just echoing what I noted in slack—

imho:

  • colour alone is insufficient
  • visual markers (addition/subtraction of something, or a bevel/depressed effect — eg for when it’s actively clicked) are good
  • this applies for :hover, :focus, and :active… and balancing all three can be hard. :)

@jonathanconway
Copy link
Contributor Author

Hmm... I can imagine an :active state being useful for, say, a toggle-button.

@jonathanconway jonathanconway changed the title Are button hover states sufficiently contrasted to be recognisable to differently-sighted users? Button colour contrasts fail AAA (and AA for disabled buttons) Feb 9, 2017
@jonathanconway
Copy link
Contributor Author

jonathanconway commented Feb 9, 2017

Update:

New design guide buttons also don't entirely conform to WCAG, in terms of colour contrast.

Regular buttons conform to AA but not AAA.
Disabled buttons conform to neither AA nor AAA.

Deleted. Government isn't required to support AAA and disabled buttons are actually black on grey, which passes AAA.

@klepas klepas changed the title Button colour contrasts fail AAA (and AA for disabled buttons) Button contrast and visual marker changes Feb 16, 2017
@AndrewArch
Copy link

buttons need a visible indication when they receive keyboard focus - this can be a distinct colour change (at least a 3:1 contrast difference between focus/non-focus states, while still maintaining the text:background contrast of 4.5:1) or an additional indicator like a border or pattern - https://www.w3.org/WAI/WCAG20/quickref/#qr-navigation-mechanisms-focus-visible
See also

@klepas
Copy link
Contributor

klepas commented Feb 17, 2017

Just adding some more bg info on the direction in 2.x:

  • we will be adding button variants: primary, secondary, tertiary, and disabled states for all 3.
  • we will adhere to the WCAG 2 AA guidelines (thanks @AndrewArch)
  • this may mean we add insets/non-colour changes, but it will likely result in just colour changes — up to @gazhands.

I’m closing this unless there are objections to re-open.

@AndrewArch
Copy link

AndrewArch commented Feb 17, 2017

Just to also note - all color changes need to be checked against color blindness as well as contrast

(no need to reopen - just adding to my a11y note)

@gazhands
Copy link

Cheers all

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants