diff --git a/.oxlintrc.json b/.oxlintrc.json index 7c01c520b74..85a5dbdce0b 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -76,7 +76,7 @@ "react/no-unknown-property": "error", "jsx-a11y/alt-text": "error", "jsx-a11y/aria-role": "error", - "jsx-a11y/click-events-have-key-events": "off", + "jsx-a11y/click-events-have-key-events": "error", "jsx-a11y/control-has-associated-label": [ "error", { @@ -87,7 +87,7 @@ "jsx-a11y/label-has-associated-control": "error", "jsx-a11y/no-autofocus": "off", "jsx-a11y/no-noninteractive-element-interactions": "error", - "jsx-a11y/no-static-element-interactions": "off", + "jsx-a11y/no-static-element-interactions": "error", "jsx-a11y/prefer-tag-over-role": "off", "jsx-a11y/anchor-ambiguous-text": "error", "jsx-a11y/anchor-has-content": "error", diff --git a/apps/webapp/app/components/code/TSQLEditor.tsx b/apps/webapp/app/components/code/TSQLEditor.tsx index 372c2be129c..073ba7f3e55 100644 --- a/apps/webapp/app/components/code/TSQLEditor.tsx +++ b/apps/webapp/app/components/code/TSQLEditor.tsx @@ -264,6 +264,7 @@ export function TSQLEditor(opts: TSQLEditorProps) { const showButtons = showClearButton || showCopyButton || showFormatButton || additionalActions; + /* oxlint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- The CodeMirror mount forwards pointer focus to CodeMirror's own keyboard-accessible editor. */ return (
); } +/* oxlint-enable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */ // SQL keywords that legitimately appear before parentheses with a space const SQL_KEYWORDS_BEFORE_PAREN = new Set([ diff --git a/apps/webapp/app/components/code/TSQLResultsTable.tsx b/apps/webapp/app/components/code/TSQLResultsTable.tsx index c3ad0ccdf0e..106a82fe16d 100644 --- a/apps/webapp/app/components/code/TSQLResultsTable.tsx +++ b/apps/webapp/app/components/code/TSQLResultsTable.tsx @@ -14,6 +14,7 @@ import { type ColumnFiltersState, type ColumnResizeMode, type FilterFn, + type Header, type SortDirection, type SortingState, } from "@tanstack/react-table"; @@ -1045,6 +1046,24 @@ function FilterCell({ ); } +/* oxlint-disable jsx-a11y/no-static-element-interactions -- Column resizing is a pointer-drag interaction provided by TanStack Table. */ +function ColumnResizeHandle({ header }: { header: Header }) { + return ( +
header.column.resetSize()} + onMouseDown={header.getResizeHandler()} + onTouchStart={header.getResizeHandler()} + className={cn( + "absolute right-0 top-0 h-full w-0.5 cursor-col-resize touch-none select-none", + "opacity-0 group-hover/header:opacity-100", + "bg-surface-control hover:bg-indigo-500", + header.column.getIsResizing() && "bg-indigo-500 opacity-100" + )} + /> + ); +} +/* oxlint-enable jsx-a11y/no-static-element-interactions */ + export const TSQLResultsTable = memo(function TSQLResultsTable({ rows, columns, @@ -1237,18 +1256,7 @@ export const TSQLResultsTable = memo(function TSQLResultsTable({ > {flexRender(header.column.columnDef.header, header.getContext())} - {/* Column resizer */} -
header.column.resetSize()} - onMouseDown={header.getResizeHandler()} - onTouchStart={header.getResizeHandler()} - className={cn( - "absolute right-0 top-0 h-full w-0.5 cursor-col-resize touch-none select-none", - "opacity-0 group-hover/header:opacity-100", - "bg-surface-control hover:bg-indigo-500", - header.column.getIsResizing() && "bg-indigo-500 opacity-100" - )} - /> + ); })} diff --git a/apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx b/apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx index 6e9b9bbcbdb..419fb5f22aa 100644 --- a/apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx +++ b/apps/webapp/app/components/dashboard-agent/DashboardAgentPanel.tsx @@ -581,6 +581,7 @@ export function DashboardAgentPanel({ // Not filtered to active: the wake banner needs watches that already fired. const chatWatches = activeChat?.watches ?? []; + /* oxlint-disable jsx-a11y/no-static-element-interactions -- Escape handling intentionally bubbles from focused controls inside the panel. */ return (
); } +/* oxlint-enable jsx-a11y/no-static-element-interactions */ diff --git a/apps/webapp/app/components/primitives/Input.tsx b/apps/webapp/app/components/primitives/Input.tsx index 0b365fa60f1..9cb2fccda21 100644 --- a/apps/webapp/app/components/primitives/Input.tsx +++ b/apps/webapp/app/components/primitives/Input.tsx @@ -95,6 +95,7 @@ const Input = React.forwardRef( const inputClassName = variants[variant].input; const variantIconClassName = variants[variant].iconSize; + /* oxlint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions -- The wrapper only forwards pointer focus to its nested input. */ return (
( ); } ); +/* oxlint-enable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */ Input.displayName = "Input"; export { Input };