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

Add focus state styles for the cookie banner #2128

Closed
3 tasks done
hannalaakso opened this issue Jan 28, 2021 · 2 comments
Closed
3 tasks done

Add focus state styles for the cookie banner #2128

hannalaakso opened this issue Jan 28, 2021 · 2 comments

Comments

@hannalaakso
Copy link
Member

hannalaakso commented Jan 28, 2021

What

Further to #2098, we should add a focus style for the cookie banner. This could be similar to the notification banner focus state.

We could add this in #2126 or separately if we don't want to block merging that PR.

Why

The cookie banner needs to have a focus state as it should be focused after the user accepts or rejects cookies.

Who needs to know about this

Designer, developer

Done when

  • We've decided what the focus state should be
  • We've added the styles
  • The styles have been reviewed by a designer
@hannalaakso hannalaakso added awaiting triage Needs triaging by team cookie banner labels Jan 28, 2021
@CharlotteDowns
Copy link
Contributor

Two ideas for team review:

Offset outline

Cookie banner message focus state using an offset outline

Background and underline to text

Cookie banner message focus state to add yellow background to text and black underline

@trang-erskine trang-erskine added accessibility needs research and removed awaiting triage Needs triaging by team labels Feb 1, 2021
@vanitabarrett
Copy link
Contributor

We have decided to publish the component without a visible focus state to start with.

From @hannalaakso: The focused cookie banner is the first element on the page and the last thing the user
interacted with prior to it gaining focus. We therefore assume that moving focus to it is not going to surprise users, and that giving it a visible focus indicator could be more confusing than helpful, especially as the element is not normally keyboard operable.

We have flagged this in the research section of the guidance as something to monitor.

A related discussion: w3c/wcag#1001

It's also worth noting that this is different to what we do with the notification banner which does have a visible focus indicator. However, the notification banner is further down the page and the user might not have interacted with it prior to it gaining focus so it is helpful to indicate to users that the focus has moved to it (even though the element, like the cookie banner, isn’t normally keyboard operable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants