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: a11y rule "interactive-supports-focus" fails with a warning #4159

Open
wants to merge 4 commits into
base: beta
Choose a base branch
from

Conversation

Bashamega
Copy link
Contributor

Description

The changes include adding tabIndex={0} to elements with role="tab" to ensure they are focusable for
keyboard navigation, addressing the accessibility warning (jsx-a11y/interactive-supports-focus).
Additionally, an onKeyDown handler was introduced to allow keyboard interaction, enabling users to
select tabs using the Enter or Space keys. These changes improve both accessibility and user
experience by making the tabs keyboard-accessible.

Related Tickets & Documents

fixes #4138

Mobile & Desktop Screenshots/Recordings

lint output:

./lib/hooks/useSupabaseAuth.ts
40:6  Warning: React Hook useEffect has missing dependencies: 'loadSession' and 'store'. Either include them or remove the de
40:6  Warning: React Hook useEffect has missing dependencies: 'loadSession' and 'store'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
npm info ok
PS D:\dev\app> ^C
40:6  Warning: React Hook useEffect has missing dependencies: 'loadSession' and 'store'. Either include them or remove the de
40:6  Warning: React Hook useEffect has missing dependencies: 'loadSession' and 'store'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
npm info ok
PS D:\dev\app> ^C
/basic-features/eslint#disabling-rules
npm info ok
PS D:\dev\app> ^C
PS D:\dev\app> ^C
PS D:\dev\app> npm run lint
npm info using [email protected]
npm info using [email protected]

> @open-sauced/[email protected] lint
> next lint


./pages/404.tsx
19:6  Warning: React Hook useEffect has a missing dependency: 'isLoading'. Either include it or remove the dependency array. 
19:6  Warning: React Hook useEffect has a missing dependency: 'isLoading'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/feed/index.tsx
119:6  Warning: React Hook useEffect has a missing dependency: 'signIn'. Either include it or remove the dependency array.  r
119:6  Warning: React Hook useEffect has a missing dependency: 'signIn'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
127:6  Warning: React Hook useEffect has a missing dependency: 'followersRepo'. Either include it or remove the dependency ar
127:6  Warning: React Hook useEffect has a missing dependency: 'followersRepo'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
133:6  Warning: React Hook useEffect has a missing dependency: 'openSingleHighlight'. Either include it or remove the depende
133:6  Warning: React Hook useEffect has a missing dependency: 'openSingleHighlight'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/u/[username]/card.tsx
137:23  Warning: <iframe> elements must have a unique title property.  jsx-a11y/iframe-has-title
173:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
173:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
173:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
173:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
173:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./pages/user/notifications.tsx
63:6  Warning: React Hook useEffect has missing dependencies: 'fetchNotifications' and 'router'. Either include them or remov
63:6  Warning: React Hook useEffect has missing dependencies: 'fetchNotifications' and 'router'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./pages/workspaces/new.tsx
114:6  Warning: React Hook useEffect has missing dependencies: 'loadSbomRepo' and 'router.query.repo'. Either include them or
114:6  Warning: React Hook useEffect has missing dependencies: 'loadSbomRepo' and 'router.query.repo'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./pages/workspaces/[workspaceId]/contributor-insights/new.tsx
98:6  Warning: React Hook useEffect has missing dependencies: 'contributorIds' and 'title'. Either include them or remove the
98:6  Warning: React Hook useEffect has missing dependencies: 'contributorIds' and 'title'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./pages/workspaces/[workspaceId]/contributor-insights/[listId]/highlights.tsx
163:6  Warning: React Hook useEffect has a missing dependency: 'contributor'. Either include it or remove the dependency arra
163:6  Warning: React Hook useEffect has a missing dependency: 'contributor'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
207:25  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cl
207:25  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
207:25  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and sup
207:25  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactio
207:25  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./pages/workspaces/[workspaceId]/repository-insights/new.tsx
54:6  Warning: React Hook useEffect has a missing dependency: 'repos'. Either include it or remove the dependency array.  rea
54:6  Warning: React Hook useEffect has a missing dependency: 'repos'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./pages/_app.tsx
95:6  Warning: React Hook useEffect has a missing dependency: 'router.events'. Either include it or remove the dependency arr
95:6  Warning: React Hook useEffect has a missing dependency: 'router.events'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/AddContributorsHeader/add-contributors-header.tsx
39:6  Warning: React Hook useEffect has a missing dependency: 'onSearch'. Either include it or remove the dependency array. I
39:6  Warning: React Hook useEffect has a missing dependency: 'onSearch'. Either include it or remove the dependency array. If 'onSearch' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hoo
39:6  Warning: React Hook useEffect has a missing dependency: 'onSearch'. Either include it or remove the dependency array. If 'onSearch' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps
84:9  Warning: A form label must be associated with a control.  jsx-a11y/label-has-associated-control

./components/atoms/Card/card.tsx
14:7  Warning: `tabIndex` should only be declared on interactive elements.  jsx-a11y/no-noninteractive-tabindex

./components/atoms/ListNameHeader/list-name-header.tsx
36:13  Warning: The autoFocus prop should not be used, as it can reduce usability and accessibility for users.  jsx-a11y/no-a
36:13  Warning: The autoFocus prop should not be used, as it can reduce usability and accessibility for users.  jsx-a11y/no-autofocus

./components/atoms/PillSelector/pill-selector.tsx
66:13  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
66:13  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
66:13  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
66:13  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
66:13  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions
72:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
72:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
72:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
72:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
72:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/atoms/Radio/radio.tsx
17:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/clic
17:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
17:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and suppo
17:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/atoms/RadioCheck/radio-check.tsx
15:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/clic
15:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
15:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and suppo
15:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/atoms/Search/search.tsx
122:9  Warning: The autoFocus prop should not be used, as it can reduce usability and accessibility for users.  jsx-a11y/no-a
122:9  Warning: The autoFocus prop should not be used, as it can reduce usability and accessibility for users.  jsx-a11y/no-autofocus
144:15  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cl
144:15  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
144:15  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and sup
144:15  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactio
144:15  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/atoms/SkeletonLoader/skeleton-wrapper.stories.tsx
16:14  Warning: The story should use PascalCase notation: tripleWrappers  storybook/prefer-pascal-case

./components/atoms/SVGIcon/svg-icon.tsx
14:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/clic
14:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
14:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and suppo
14:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/atoms/TextInput/text-input.tsx
80:17  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
80:17  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
80:17  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
80:17  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
80:17  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/atoms/ToggleGroup/toggle-group.stories.tsx
30:7  Warning: The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href val
30:7  Warning: The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with approp
30:7  Warning: The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md  jsx-a
30:7  Warning: The href attribute requires a valid value to be accessible. Provide a valid, navigable address as the href value. If you cannot provide a valid href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/docs/rules/anchor-is-valid.md  jsx-a11y/anchor-is-valid

./components/atoms/ToggleOption/toggle-option.tsx
11:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/clic
11:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
11:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and suppo
11:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/Contributors/AddToContributorInsightDrawer.tsx
88:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` t
88:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/mes
88:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/Contributors/AddToContributorInsightModal.tsx
88:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` t
88:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/mes
88:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/molecules/AnnouncementCard/announcement-card.tsx
23:13  Warning: Redundant alt attribute. Screen-readers already announce `img` tags as an image. You don’t need to use the wo
23:13  Warning: Redundant alt attribute. Screen-readers already announce `img` tags as an image. You don’t need to use the words `image`, `photo,` or `picture` (or any specified custom words) in the alt prop.  jsx-a11y/img-redundant-alt

./components/molecules/AuthSection/auth-section.tsx
50:6  Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array.  re
50:6  Warning: React Hook useEffect has a missing dependency: 'router'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
56:6  Warning: React Hook useEffect has a missing dependency: 'userInfo'. Either include it or remove the dependency array.  
56:6  Warning: React Hook useEffect has a missing dependency: 'userInfo'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
86:7  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/clic
86:7  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
86:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and suppo
86:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/CardHorizontalBarChart/card-horizontal-bar-chart.tsx
57:17  Warning: onMouseOver must be accompanied by onFocus for accessibility.  jsx-a11y/mouse-events-have-key-events

./components/molecules/CardRepoList/card-repo-list.tsx
47:17  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
47:17  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
47:17  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
47:17  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
47:17  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/ContributorFilterDropdown/contributor-filter-dropdown.tsx
42:7  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/clic
42:7  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
42:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and suppo
42:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/ContributorHighlight/contributor-highlight-card.tsx
168:6  Warning: React Hook useEffect has a missing dependency: 'taggedRepoList'. Either include it or remove the dependency a
168:6  Warning: React Hook useEffect has a missing dependency: 'taggedRepoList'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
479:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the 
479:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
546:21  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cl
546:21  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
546:21  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and sup
546:21  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactio
546:21  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions
558:21  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cl
558:21  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
558:21  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and sup
558:21  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactio
558:21  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/ContributorListTableRow/contributor-list-table-row.tsx
146:13  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cl
146:13  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
146:13  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and sup
146:13  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactio
146:13  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/ContributorProfileHeader/contributor-profile-header.tsx
398:6  Warning: React Hook useEffect has missing dependencies: 'handleAddToList' and 'selectedList.length'. Either include th
398:6  Warning: React Hook useEffect has missing dependencies: 'handleAddToList' and 'selectedList.length'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/molecules/DevCard/dev-card.tsx
100:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
100:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
100:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
100:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
100:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/HighlightInput/highlight-input-form.tsx
318:6  Warning: React Hook useEffect has a missing dependency: 'fetchAllUserHighlights'. Either include it or remove the depe
318:6  Warning: React Hook useEffect has a missing dependency: 'fetchAllUserHighlights'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
354:6  Warning: React Hook useEffect has missing dependencies: 'handleGenerateHighlightSummary' and 'taggedRepoList'. Either 
354:6  Warning: React Hook useEffect has missing dependencies: 'handleGenerateHighlightSummary' and 'taggedRepoList'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
553:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the 
553:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
757:31  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cl
757:31  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
757:31  Warning: Non-interactive elements should not be assigned mouse or keyboard event listeners.  jsx-a11y/no-noninteracti
757:31  Warning: Non-interactive elements should not be assigned mouse or keyboard event listeners.  jsx-a11y/no-noninteractive-element-interactions
1027:9  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cl
1027:9  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
1027:9  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and sup
1027:9  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactio
1027:9  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/HighlightsFeedCard/highlights-filter-card.tsx
24:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
24:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
24:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
24:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
24:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/HubContributorsHeader/hub-contributors-header.tsx
50:6  Warning: React Hook useEffect has missing dependencies: 'contributorSearch' and 'onSearch'. Either include them or remo
50:6  Warning: React Hook useEffect has missing dependencies: 'contributorSearch' and 'onSearch'. Either include them or remove the dependency array. If 'onSearch' changes too often, find the parent component that defines it and wrap that definition 
50:6  Warning: React Hook useEffect has missing dependencies: 'contributorSearch' and 'onSearch'. Either include them or remove the dependency array. If 'onSearch' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/molecules/InfoCard/info-card.tsx
12:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/clic
12:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
12:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and suppo
12:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/RepoRow/repo-row.tsx
172:13  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cl
172:13  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
172:13  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and sup
172:13  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactio
172:13  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions
228:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cl
228:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
228:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and sup
228:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactio
228:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/ReposoitoryCartItem/repository-cart-item.tsx
27:9  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/clic
27:9  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
27:9  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and suppo
27:9  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/SuperlativeSelector/superlative-selector.tsx
53:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
53:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
53:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
53:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
53:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions
69:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
69:11  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
69:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
69:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
69:11  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/molecules/TableHeader/table-header.tsx
56:6  Warning: React Hook React.useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove
56:6  Warning: React Hook React.useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/Contributors/contributors.tsx
61:6  Warning: React Hook useLayoutEffect has a missing dependency: 'defaultLayout'. Either include it or remove the dependen
61:6  Warning: React Hook useLayoutEffect has a missing dependency: 'defaultLayout'. Either include it or remove the dependency array. If 'setLayout' needs the current value of 'defaultLayout', you can also switch to useReducer instead of useState an
61:6  Warning: React Hook useLayoutEffect has a missing dependency: 'defaultLayout'. Either include it or remove the dependency array. If 'setLayout' needs the current value of 'defaultLayout', you can also switch to useReducer instead of useState and read 'defaultLayout' in the reducer.  react-hooks/exhaustive-deps

./components/organisms/DevCardWall/dev-card-wall.tsx
272:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
272:5  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
272:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
272:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
272:5  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/organisms/InsightPage/InsightPage.tsx
131:6  Warning: React Hook useEffect has missing dependencies: 'user?.user_metadata.sub', 'workspaceId', and 'workspacesLoadi
131:6  Warning: React Hook useEffect has missing dependencies: 'user?.user_metadata.sub', 'workspaceId', and 'workspacesLoading'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
528:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the 
528:6  Warning: React Hook useEffect has a missing dependency: 'updateSuggestionsDebounced'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/SearchDialog/search-dialog.tsx
47:6  Warning: React Hook useEffect has a missing dependency: 'setOpenSearch'. Either include it or remove the dependency arr
47:6  Warning: React Hook useEffect has a missing dependency: 'setOpenSearch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
83:6  Warning: React Hook useEffect has missing dependencies: 'cursor', 'providerToken', and 'searchTerm.length'. Either incl
83:6  Warning: React Hook useEffect has missing dependencies: 'cursor', 'providerToken', and 'searchTerm.length'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
140:7  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
140:7  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
140:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
140:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
140:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions
152:13  Warning: The autoFocus prop should not be used, as it can reduce usability and accessibility for users.  jsx-a11y/no-
152:13  Warning: The autoFocus prop should not be used, as it can reduce usability and accessibility for users.  jsx-a11y/no-autofocus
199:6  Warning: React Hook useEffect has a missing dependency: 'setOpenSearch'. Either include it or remove the dependency ar
199:6  Warning: React Hook useEffect has a missing dependency: 'setOpenSearch'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
203:7  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
203:7  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
203:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
203:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
203:7  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions
218:9  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/cli
218:9  Warning: Visible, non-interactive elements with click handlers must have at least one keyboard listener.  jsx-a11y/click-events-have-key-events
218:9  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and supp
218:9  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interaction
218:9  Warning: Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element.  jsx-a11y/no-static-element-interactions

./components/organisms/ToolList/nav.tsx
36:7  Warning: Non-interactive elements should not be assigned interactive roles.  jsx-a11y/no-noninteractive-element-to-inte
36:7  Warning: Non-interactive elements should not be assigned interactive roles.  jsx-a11y/no-noninteractive-element-to-interactive-role

./components/organisms/TopNav/top-nav.tsx
91:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` t
91:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/mes
91:13  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/organisms/UserRepositoryRecommendations/user-repository-recommendations.tsx
74:6  Warning: React Hook useEffect has a missing dependency: 'getRepoFullNameByInterests'. Either include it or remove the d
74:6  Warning: React Hook useEffect has a missing dependency: 'getRepoFullNameByInterests'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps
78:6  Warning: React Hook useEffect has a missing dependency: 'refreshUserRecommendedRepos'. Either include it or remove the 
78:6  Warning: React Hook useEffect has a missing dependency: 'refreshUserRecommendedRepos'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/organisms/UserSettingsPage/user-settings-page.tsx
341:15  Warning: A form label must be associated with a control.  jsx-a11y/label-has-associated-control
403:15  Warning: A form label must be associated with a control.  jsx-a11y/label-has-associated-control
443:23  Warning: A form label must be associated with a control.  jsx-a11y/label-has-associated-control
470:19  Warning: A form label must be associated with a control.  jsx-a11y/label-has-associated-control

./components/Repositories/AddToWorkspaceDrawer.tsx
96:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` t
96:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/mes
96:11  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/Repositories/AddToWorkspaceModal.tsx
76:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` t
76:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/mes
76:17  Warning: Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element  @next/next/no-img-element

./components/Repositories/ContributorConfidenceChart.tsx
28:5  Warning: React Hook useMemo has a missing dependency: 'percentage'. Either include it or remove the dependency array.  
28:5  Warning: React Hook useMemo has a missing dependency: 'percentage'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/Repositories/LotteryFactorChart.tsx
46:9  Warning: The 'topFourContributors' logical expression could make the dependencies of useMemo Hook (at line 93) change o
46:9  Warning: The 'topFourContributors' logical expression could make the dependencies of useMemo Hook (at line 93) change on every render. To fix this, wrap the initialization of 'topFourContributors' in its own useMemo() Hook.  react-hooks/exhaust
46:9  Warning: The 'topFourContributors' logical expression could make the dependencies of useMemo Hook (at line 93) change on every render. To fix this, wrap the initialization of 'topFourContributors' in its own useMemo() Hook.  react-hooks/exhaustive-deps
81:6  Warning: React Hook useMemo has a missing dependency: 'lotteryFactor?.all_contribs.length'. Either include it or remove
81:6  Warning: React Hook useMemo has a missing dependency: 'lotteryFactor?.all_contribs.length'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/shared/AppSidebar/AppSidebar.tsx
108:15  Warning: A form label must be associated with a control.  jsx-a11y/label-has-associated-control

./components/shared/DayRangePicker.tsx
43:5  Warning: A form label must be associated with a control.  jsx-a11y/label-has-associated-control

./components/shared/InfoTooltip.tsx
11:17  Warning: onMouseOver must be accompanied by onFocus for accessibility.  jsx-a11y/mouse-events-have-key-events

./components/shared/LimitPicker.tsx
28:5  Warning: A form label must be associated with a control.  jsx-a11y/label-has-associated-control

./components/StarSearch/Chatbox.tsx
53:25  Warning: Anchors must have content and the content must be accessible by a screen reader.  jsx-a11y/anchor-has-content
73:26  Warning: Anchors must have content and the content must be accessible by a screen reader.  jsx-a11y/anchor-has-content

./components/StarSearch/StarSearchChat.tsx
271:6  Warning: React Hook useEffect has an unnecessary dependency: 'inputRef.current'. Either exclude it or remove the depen
271:6  Warning: React Hook useEffect has an unnecessary dependency: 'inputRef.current'. Either exclude it or remove the dependency array. Mutable values like 'inputRef.current' aren't valid dependencies because mutating them doesn't re-render the com
271:6  Warning: React Hook useEffect has an unnecessary dependency: 'inputRef.current'. Either exclude it or remove the dependency array. Mutable values like 'inputRef.current' aren't valid dependencies because mutating them doesn't re-render the component.  react-hooks/exhaustive-deps
292:6  Warning: React Hook useEffect has missing dependencies: 'isRunning', 'processStream', and 'ranOnce'. Either include th
292:6  Warning: React Hook useEffect has missing dependencies: 'isRunning', 'processStream', and 'ranOnce'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps
700:13  Warning: The attribute aria-setsize is not supported by the role feed.  jsx-a11y/role-supports-aria-props

./components/StarSearch/Widgets/LotteryFactorWidget.tsx
29:6  Warning: React Hook useEffect has a missing dependency: 'longUrl'. Either include it or remove the dependency array.  r
29:6  Warning: React Hook useEffect has a missing dependency: 'longUrl'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./components/Tables/ContributorsTable.tsx
271:7  Warning: React Hook useMemo has a missing dependency: 'repository'. Either include it or remove the dependency array. 
 react-hooks/exhaustive-deps

./components/TabList/tab-list.tsx
30:7  Warning: Non-interactive elements should not be assigned interactive roles.  jsx-a11y/no-noninteractive-element-to-inte
30:7  Warning: Non-interactive elements should not be assigned interactive roles.  jsx-a11y/no-noninteractive-element-to-interactive-role
63:7  Warning: Non-interactive elements should not be assigned interactive roles.  jsx-a11y/no-noninteractive-element-to-inte
63:7  Warning: Non-interactive elements should not be assigned interactive roles.  jsx-a11y/no-noninteractive-element-to-interactive-role

./components/Workspaces/InsightUpgradeModal.tsx
36:6  Warning: React Hook useEffect has missing dependencies: 'posthog' and 'workspaceId'. Either include them or remove the 
36:6  Warning: React Hook useEffect has missing dependencies: 'posthog' and 'workspaceId'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./components/Workspaces/TrackedContributorsWizard/SelectFollowingStep.tsx
29:6  Warning: React Hook useEffect has a missing dependency: 'onToggleContributor'. Either include it or remove the dependen
29:6  Warning: React Hook useEffect has a missing dependency: 'onToggleContributor'. Either include it or remove the dependency array. If 'onToggleContributor' changes too often, find the parent component that defines it and wrap that definition in u
29:6  Warning: React Hook useEffect has a missing dependency: 'onToggleContributor'. Either include it or remove the dependency array. If 'onToggleContributor' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/Workspaces/TrackedRepositoryFilter.tsx
15:6  Warning: React Hook useEffect has a missing dependency: 'handleSelect'. Either include it or remove the dependency arra
15:6  Warning: React Hook useEffect has a missing dependency: 'handleSelect'. Either include it or remove the dependency array. If 'handleSelect' changes too often, find the parent component that defines it and wrap that definition in useCallback.  r
15:6  Warning: React Hook useEffect has a missing dependency: 'handleSelect'. Either include it or remove the dependency array. If 'handleSelect' changes too often, find the parent component that defines it and wrap that definition in useCallback.  react-hooks/exhaustive-deps

./components/Workspaces/WorkspaceBanner.tsx
14:6  Warning: React Hook useEffect has missing dependencies: 'posthog' and 'workspaceId'. Either include them or remove the 
14:6  Warning: React Hook useEffect has missing dependencies: 'posthog' and 'workspaceId'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/api/useGetStarSearchWorkspaceHistory.ts
61:6  Warning: React Hook useEffect has a missing dependency: 'mutate'. Either include it or remove the dependency array.  re
61:6  Warning: React Hook useEffect has a missing dependency: 'mutate'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/useFilterPrefetch.ts
24:6  Warning: React Hook useEffect has a missing dependency: 'filterOptions'. Either include it or remove the dependency arr
24:6  Warning: React Hook useEffect has a missing dependency: 'filterOptions'. Either include it or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/useSession.ts
48:6  Warning: React Hook useEffect has missing dependencies: 'getSession', 'loadSession', and 'setStoreData'. Either include
48:6  Warning: React Hook useEffect has missing dependencies: 'getSession', 'loadSession', and 'setStoreData'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

./lib/hooks/useSupabaseAuth.ts
40:6  Warning: React Hook useEffect has missing dependencies: 'loadSession' and 'store'. Either include them or remove the de
40:6  Warning: React Hook useEffect has missing dependencies: 'loadSession' and 'store'. Either include them or remove the dependency array.  react-hooks/exhaustive-deps

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules    
npm info ok 

Steps to QA

Tier (staff will fill in)

  • Tier 1
  • Tier 2
  • Tier 3
  • Tier 4

[optional] What gif best describes this PR or how it makes you feel?

…supports-focus" warning

The changes include adding tabIndex={0} to elements with role="tab" to ensure they are focusable for
keyboard navigation, addressing the accessibility warning (jsx-a11y/interactive-supports-focus).
Additionally, an onKeyDown handler was introduced to allow keyboard interaction, enabling users to
select tabs using the Enter or Space keys. These changes improve both accessibility and user
experience by making the tabs keyboard-accessible.

fixes open-sauced#4138
Copy link

netlify bot commented Oct 11, 2024

👷 Deploy request for oss-insights pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 201cd63

Copy link

netlify bot commented Oct 11, 2024

Deploy Preview for design-insights ready!

Name Link
🔨 Latest commit 201cd63
🔍 Latest deploy log https://app.netlify.com/sites/design-insights/deploys/671bb0be3905640008787cfd
😎 Deploy Preview https://deploy-preview-4159--design-insights.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

components/TabList/tab-list.tsx Outdated Show resolved Hide resolved
components/TabList/tab-list.tsx Outdated Show resolved Hide resolved
@nickytonline
Copy link
Member

nickytonline commented Oct 24, 2024

Hi @Bashamega, just seeing if you're blocked on anything. No rush on this, just checking in.

@Bashamega
Copy link
Contributor Author

Hi @Bashamega, just seeing if you're blocked on anything. No rush on this, just checking in.

I don't quite understand the required changes

@nickytonline
Copy link
Member

nickytonline commented Oct 25, 2024

I'm just looking at the PR again, and it looks like the additional feedback I made wasn't saved. I'll post it shortly.

key={index}
className={`tool-list-item border-b-2 transition-all ease-in-out ${
className={clsx(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reviewing the pull request, this really is just links in a navigation element that look like tabs, but they really are just. links.

The role="tablist" can be removed from the <nav /> and the role="tab" on the <div /> can be removed.

@@ -77,6 +77,11 @@ export const SubTabsList = ({ tabList, pageId, selectedTab, label, textSize, onS
key={index}
className={clsx(isSelected && "bg-white shadow", "rounded py-1 px-2", !isSelected && "text-light-slate-11")}
onClick={onSelect ? () => onSelect(tab) : undefined}
onKeyDown={(e) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the SubTabsList, it's not a tab list if there is no onSelect, it's just links. But if the onSelect is present, it means it is a tab list. We can rework the SubTabsList component to this.

export const SubTabsList = ({ tabList, pageId, selectedTab, label, textSize, onSelect }: SubTabsListProps) => {
  const ContainerComponent = onSelect ? "div" : "nav";
  const extraProps = onSelect ? { role: "tablist" } : {};

  return (
    <ContainerComponent
      {...extraProps}
      aria-label={label}
      className={clsx(
        "flex items-center w-max overflow-x-auto overflow-y-hidden gap-2 bg-light-slate-3 p-1 rounded",
        textSize === "small" && "text-sm"
      )}
    >
      {tabList.map((tab, index) => {
        const isSelected = selectedTab === tab.name.toLowerCase();

        return (
          <div
            key={index}
            className={clsx(isSelected && "bg-white shadow", "rounded py-1 px-2", !isSelected && "text-light-slate-11")}
          >
            {onSelect ? (
              <button role="tab" onClick={() => onSelect(tab)}>
                tab.name
              </button>
            ) : (
              <Link href={`${pageId ? `${pageId}/` : ""}${tab.path}`}>{tab.name}</Link>
            )}
          </div>
        );
      })}
    </ContainerComponent>
  );
};

This could be improved, but I don't want to introduced too much refactoring for the moment as the goal of the issue was to sort out some accessibility issues.

Note that because we've introduced a button when the onSelect exists, i.e.

            {onSelect ? (
              <button role="tab" onClick={() => onSelect(tab)}>
                tab.name
              </button>
            ) : (
              <Link href={`${pageId ? `${pageId}/` : ""}${tab.path}`}>{tab.name}</Link>
            )}

we no longer need the onKeyDown to handle ENTER as this is handled natively with a button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enhancement: a11y rule "interactive-supports-focus" fails with a warning.
2 participants