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

fix: ignore rule exceptions #650

Merged
merged 1 commit into from
Jan 14, 2020
Merged
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
42 changes: 22 additions & 20 deletions packages/gatsby-theme-carbon/src/components/GlobalSearch/Menu.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Gatsby doesn't include the recommended exceptions to this rule
/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md#rule-details

import React, { useEffect, createContext, useContext } from 'react';
import { Link } from 'gatsby';
import cx from 'classnames';
Expand Down Expand Up @@ -42,26 +46,24 @@ const Menu = ({ results, onKeyDown }) => {
});

return (
<>
<ul
aria-labelledby="search-label"
role="menu"
id="search-menu"
className={cx(list, {
[hidden]: results.length === 0,
})}
>
{resultsWithTabAdded.map((page, index) => (
<MenuItem
id={`menu-item-${index}`}
onKeyDown={onKeyDown}
key={page.path}
index={index}
page={page}
/>
))}
</ul>
</>
<ul
aria-labelledby="search-label"
role="menu"
id="search-menu"
className={cx(list, {
[hidden]: results.length === 0,
})}
>
{resultsWithTabAdded.map((page, index) => (
<MenuItem
id={`menu-item-${index}`}
onKeyDown={onKeyDown}
key={page.path}
index={index}
page={page}
/>
))}
</ul>
);
};

Expand Down
4 changes: 4 additions & 0 deletions packages/gatsby-theme-carbon/src/components/Tabs/Tabs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Gatsby doesn't include the recommended exceptions to this rule
/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md#rule-details

import React, {
useContext,
createContext,
Expand Down