Skip to content

Commit

Permalink
chore: fix jsx-a11y in OptionsTile
Browse files Browse the repository at this point in the history
summary incorrectly flagged as non-interactive
A11yance/axobject-query/issues/319
  • Loading branch information
elycheea committed Jul 12, 2023
1 parent 930154b commit 23bdbaf
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/ibm-products/src/components/OptionsTile/OptionsTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,17 @@ export let OptionsTile = React.forwardRef(
)}
{isExpandable ? (
<details open={isOpen} ref={detailsRef}>
<summary className={`${blockClass}__header`} onClick={toggle}>
<ChevronDown size={16} className={`${blockClass}__chevron`} />
{renderTitle()}
</summary>
{
/* summary should not be considered non-interactive
* https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/656
* https://github.com/A11yance/axobject-query/issues/319
*/
/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
<summary className={`${blockClass}__header`} onClick={toggle}>
<ChevronDown size={16} className={`${blockClass}__chevron`} />
{renderTitle()}
</summary>
}

<div className={`${blockClass}__content`} ref={contentRef}>
<Layer>
Expand Down

0 comments on commit 23bdbaf

Please sign in to comment.