-
Notifications
You must be signed in to change notification settings - Fork 60
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
adding focus and keyboard accessibility to the cookie consent buttons #945
base: staging
Are you sure you want to change the base?
adding focus and keyboard accessibility to the cookie consent buttons #945
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
color="tertiary" | ||
label="Decline" | ||
startContent={<X />} | ||
onPress={() => onClickButton(false)} | ||
/> | ||
|
||
<ThemeButton | ||
tabIndex={2} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one of those exceptions to the rule that I think is okay.
Although I have seen it said somewhere on the A11y Slack channel that by now screenreader users just expect that the cookie banner will be on the bottom and they will TAB backwards to get to it.
@@ -3,12 +3,15 @@ | |||
import { ThemeButton } from "./ThemeButton"; | |||
import { Check, X } from "@phosphor-icons/react"; | |||
import { useCookieContext } from "@/context/CookieContext"; | |||
import { useEffect, useState } from "react"; | |||
import { useEffect, useState, useRef } from "react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you have a couple of small conflicts that need to be resolved with main.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! You just need to fix your conflicts
Hi @Amberroseweeks I've changed the PR target branch from |
Note: I added positive tab values for the Accept and Decline buttons. This feels a little wrong, I am not sure if this is best practice, but it did seem to work in allowing those items to receive focus first.
This closes issue #859