Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus state does not meet WCAG 2.2 #325

Open
mrmjprice opened this issue Aug 21, 2020 · 4 comments
Open

Focus state does not meet WCAG 2.2 #325

mrmjprice opened this issue Aug 21, 2020 · 4 comments
Assignees
Labels
accessibility Only attach this to issues with accessibility concerns design done Design have finished the prototype and it is ready to be developed feature_request

Comments

@mrmjprice
Copy link
Contributor

mrmjprice commented Aug 21, 2020

What

Our current focus state does not meet WCAG 2.2 AA/AAA proposed criteria. We should aim for AAA on this criteria.

Why

  • Focus states help users to see where they are on the page
  • Currently we have a purple box around the focused element
  • Screenshot 2020-08-21 at 09 02 24
  • We need to make this better while we have the opportunity, we should aim for WCAG 2.2 AAA
  • Criteria: 3px border around whole control, change of contrast is at least 4.5:1 different from unfocused (i.e. there is a colour background within the focus background)

Anything else

GOV.UK focus states replicated to NHS Service Manual
image
image

@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.61. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@KaterinaKir
Copy link

KaterinaKir commented Aug 25, 2020

New focus state styling: Yellow fill (#ffdd00'), purple outline (#3c1053), 3px.
Yellow pages (major works) will have purple border and white fill and purple background, e.g. top nav or footer, yellow fill, white border

Focus styling overrides original style of the element, e.g. blue button and white text, becomes yellow (fill) and purple (outline and text) when keyboard operated focus is activated.

@KaterinaKir
Copy link

KaterinaKir commented Aug 26, 2020

Screenshot 2020-08-26 at 09 15 56

When user selects a button with a keyboard, focus state is activated and it overrides original styling. E.g. if user clicks on purple or blue button, it will turn yellow with outline (3px). Our buttons are rounded, but outline will not be rounded.

Yellow background styling. Please develop 2 options and we will test with users to find out which one they find easier to use.

Screenshot 2020-08-26 at 09 00 00

Form fields such as text field, radio buttons, checkboxes will have yellow outline and no fill.
Screenshot 2020-08-26 at 11 04 29

Focus state of disruptions indicators. We are removing colour meaning (red, orange, green), but we communicate severity with an icon.

Screenshot 2020-08-26 at 11 35 32

Content tile focus styling: Only heading will have focus, when users clicks it content tile link is activated. We removed 'read more' link, so the entire block is clickable.

Screenshot 2020-08-26 at 13 57 35

@daylesalmon daylesalmon added accessibility Only attach this to issues with accessibility concerns design done Design have finished the prototype and it is ready to be developed labels Aug 26, 2020
@daylesalmon
Copy link
Contributor

daylesalmon commented Aug 26, 2020

This is a fairly big change that will involve going through every component in the design system and adding a custom focus state to each.

A new class called "wmnds-bg-yellow" will need to be added to the design system and anything that is a child of this class will also need to have a custom focus state too.

So in short...

All components need 2 new classes/styling added:

  • One for generic focus state
  • Another for wmnds-yellow *:focus state

How the gov uses focus states.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Only attach this to issues with accessibility concerns design done Design have finished the prototype and it is ready to be developed feature_request
Projects
None yet
Development

No branches or pull requests

4 participants