From 8486b50d804a452a3d5ebbc64d2bdba6b0c3be6e Mon Sep 17 00:00:00 2001 From: Andrew Aquino Date: Mon, 30 Nov 2026 15:52:13 -0800 Subject: [PATCH] chore(site): enable interactive-supports-focus oxlint rule (#31148) Moves [interactive-supports-focus](https://oxc.rs/docs/guide/usage/linter/rules/jsx_a11y/interactive-supports-focus.html#what-it-does) out of the Oxlint migration backlog and sets it to `error`. I've ignored the single violation (DateTimeRangePicker.tsx) with an `oxlint-disable` comment backed up by [MDN's guidelines on required keyboard actions for role="radiogroup" elements](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/radiogroup_role#tab): >[Tab and Shift + Tab](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/radiogroup_role#tab) > > Move focus into and out of the `radiogroup`. When focus moves into a `radiogroup`, if a radio button is checked, focus is set on the checked button. If none of the radio buttons are checked, focus is set on the first radio button in the group. Adding `tabIndex` on that radio group per `interactive-supports-focus` would add an unnecessary extra tab stop before a user is able to select date range picker options. Verified with: - `pnpm oxlint --deny-warnings` - `pnpm biome lint --error-on-warnings` - `pnpm tsc -p .` --- site/.oxlintrc.jsonc | 3 +-- .../src/components/DateTimeRangePicker/DateTimeRangePicker.tsx | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/site/.oxlintrc.jsonc b/site/.oxlintrc.jsonc index c9fc0920741..425ebd9d75a 100644 --- a/site/.oxlintrc.jsonc +++ b/site/.oxlintrc.jsonc @@ -33,6 +33,7 @@ "media-has-caption": "error", "click-events-have-key-events": "error", "no-noninteractive-tabindex": "error", + "interactive-supports-focus": "error", "iframe-has-title": "error", // --- complexity --- @@ -226,8 +227,6 @@ // Effort = approximate work before enabling: // small < medium < large < xl. // ========================================================== - "interactive-supports-focus": "off", // a11y/useFocusableInteractive (small) - // Correctness category rules with existing violations. "require-mock-type-parameters": "off", // (xl) "prefer-tag-over-role": "off", // (large) diff --git a/site/src/components/DateTimeRangePicker/DateTimeRangePicker.tsx b/site/src/components/DateTimeRangePicker/DateTimeRangePicker.tsx index ca4af0fc4b5..10085955b33 100644 --- a/site/src/components/DateTimeRangePicker/DateTimeRangePicker.tsx +++ b/site/src/components/DateTimeRangePicker/DateTimeRangePicker.tsx @@ -324,6 +324,7 @@ export const DateTimeRangePicker: React.FC = ({
{/* Quick picks. This list is the entire dropdown until the user expands the custom range panel. */} + {/* oxlint-disable-next-line jsx-a11y/interactive-supports-focus -- tabIndex must be omitted here; focus order should jump directly from the popover trigger to the role="radio" children, matching the behavior of a