Skip to content

Commit

Permalink
Remove role attr on outer element
Browse files Browse the repository at this point in the history
Because we cannot have a button role in a button role.
And then our linting is complaining about assigning a tab index to a non
interactive element. We tell it to shut up because we made the element
interactive!
  • Loading branch information
spaceo committed Oct 31, 2023
1 parent 433c762 commit 9763d42
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
/* eslint-disable jsx-a11y/no-static-element-interactions */
import React, { FC, ReactNode } from "react";
import clsx from "clsx";
import { useText } from "../../../../core/utils/text";
Expand Down Expand Up @@ -87,7 +89,6 @@ const SelectableMaterial: FC<SelectableMaterialProps & MaterialProps> = ({
)}
<div
className="list-materials__content cursor-pointer"
role="button"
onClick={handleOnClick}
onKeyUp={handleOnKeyUp}
tabIndex={0}
Expand Down

0 comments on commit 9763d42

Please sign in to comment.