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

Rationalise our approach to styling focus states #3007

Open
4 tasks
Tracked by #3042
christopherthomasdesign opened this issue Aug 4, 2023 · 3 comments
Open
4 tasks
Tracked by #3042

Rationalise our approach to styling focus states #3007

christopherthomasdesign opened this issue Aug 4, 2023 · 3 comments
Assignees
Labels
accessibility design epic Epics are used in planning project boards to group related stories WCAG 2.2 All items related to WCAG 2.2 update activities

Comments

@christopherthomasdesign
Copy link
Member

christopherthomasdesign commented Aug 4, 2023

What

  1. Look at our focus states across the Design System, and make sure they're consistent and accessible
  2. Write down some principles for styling focus states for different kinds of elements

Why

We've had a few conversations recently where it's been difficult to make decisions on styling focus states. There's a risk that without establishing some guides for ourselves, things will start getting more and more inconsistent.

There are also some changes to the focus guidelines in WCAG 2.2, so we need to make sure everything we do meets those standards (there's a conversation to be had about how realistic it is to meet AAA at this point). Some of that work is already in progress.

We have some existing guidance on styling focus states, but it's not comprehensive. Longer term, we could amend and add to this, but I see this as an internal-facing thing for now.

We started some very similar work in #1853, we'll be picking up where that left off so may want to close that issue (cc @CharlotteDowns?).

Who needs to work on this

Designers, Developers, Accessibility Specialist

Who needs to review this

As above

Done when

@kellylee-gds
Copy link
Contributor

@christopherthomasdesign

@CharlotteDowns, @davidc-gds and I discussed this epic after sprint planning today when we were restructuring the WCAG epics. We've decided to move this out the prioritised epics until the design sprint research sessions have concluded. Charlotte will then become epic lead for this work and bring the work into sprints.

I've also made this card an epic and updated the done whens to be a task list which can be used to track issues when we start working on this in sprints.

@christopherthomasdesign
Copy link
Member Author

That makes sense 👍

I don't think this piece should block any other focus style-related work tbh, I just thought it would be good to try record our rationale while a few of us are thinking about it.

@owenatgov
Copy link
Contributor

@querkmachine made this comment listing all the different flavours of focus state across the library. The intent of this comment was primarily to assess how well they meet WCAG 2.2 2.4.13: focus appearance.

See the comment for more details and some screenshots but in brief our different focus state types are:

  • text links - yellow text background with 4px black bottom border
  • buttons - whole element turns yellow with 2px black bottom border
  • bordered boxes and inputs - element's black border becomes 2px thick instead of 1px (if it wasn't 2px already) with an extra "outer" 2px yellow border
  • linked images - The invert of bordered boxes where the extra yellow border is now inside the bounds of the element

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility design epic Epics are used in planning project boards to group related stories WCAG 2.2 All items related to WCAG 2.2 update activities
Projects
None yet
Development

No branches or pull requests

4 participants