AusDTO / gov-au-ui-kit

MOVED TO https://github.com/govau/uikit/
https://github.com/govau/uikit/
MIT License
19 stars 12 forks source link

Button contrast and visual marker changes #391

Closed jonathanconway closed 7 years ago

jonathanconway commented 7 years ago

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 commented 7 years ago

Just echoing what I noted in slack—

imho:

jonathanconway commented 7 years ago

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

jonathanconway commented 7 years ago

~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.

AndrewArch commented 7 years ago

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 commented 7 years ago

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

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

AndrewArch commented 7 years ago

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 commented 7 years ago

Cheers all