Skip to content

Commit 7a2b6d5

Browse files
authored
Remove a11y eslint disables (#762)
1 parent d4bfff7 commit 7a2b6d5

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

theme/src/components/drawer.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,7 @@ function Drawer({isOpen, onDismiss, children}) {
77
return (
88
<AnimatePresence>
99
{isOpen ? (
10-
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
11-
<div
12-
// These event handlers fix a bug that caused links below the fold
13-
// to be unclickable in macOS Safari.
14-
// Reference: https://github.com/theKashey/react-focus-lock/issues/79
15-
onMouseDown={event => event.preventDefault()}
16-
onClick={event => event.target.focus()}
17-
>
10+
<div>
1811
<FocusOn returnFocus={true} onEscapeKey={() => onDismiss()}>
1912
<Box
2013
key="overlay"

theme/src/components/nav-drawer.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,7 @@ function PrimerNavItems({items}) {
120120
<Details key={index}>
121121
{({open, toggle}) => (
122122
<>
123-
{/*eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
124-
<summary
125-
//The following line of code has only an onClick event and no keyboard event and its a non static
126-
//element. This is because we don't want it to be a tabstop thats tedious for keyboard users and sr's.
127-
//This needs to be a hard exception
128-
onClick={toggle}
129-
style={{cursor: 'pointer'}}
130-
>
123+
<summary style={{cursor: 'pointer'}}>
131124
<Box sx={{alignItems: 'center', justifyContent: 'space-between', display: 'flex'}}>
132125
<Text>{item.title}</Text>
133126
{open ? <ChevronUpIcon /> : <ChevronDownIcon />}

0 commit comments

Comments
 (0)