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

Remove jsx-a11y disables #762

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions theme/src/components/drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,7 @@ function Drawer({isOpen, onDismiss, children}) {
return (
<AnimatePresence>
{isOpen ? (
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
<div
// These event handlers fix a bug that caused links below the fold
// to be unclickable in macOS Safari.
// Reference: https://github.com/theKashey/react-focus-lock/issues/79
onMouseDown={event => event.preventDefault()}
onClick={event => event.target.focus()}
>
<div>
<FocusOn returnFocus={true} onEscapeKey={() => onDismiss()}>
<Box
key="overlay"
Expand Down
9 changes: 1 addition & 8 deletions theme/src/components/nav-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,7 @@ function PrimerNavItems({items}) {
<Details key={index}>
{({open, toggle}) => (
<>
{/*eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
<summary
//The following line of code has only an onClick event and no keyboard event and its a non static
//element. This is because we don't want it to be a tabstop thats tedious for keyboard users and sr's.
//This needs to be a hard exception
onClick={toggle}
style={{cursor: 'pointer'}}
>
<summary style={{cursor: 'pointer'}}>
<Box sx={{alignItems: 'center', justifyContent: 'space-between', display: 'flex'}}>
<Text>{item.title}</Text>
{open ? <ChevronUpIcon /> : <ChevronDownIcon />}
Expand Down
Loading