From 8dd083ac6f4085f0eaaa8ab6b3af23cf6208b61a Mon Sep 17 00:00:00 2001 From: mschwab Date: Wed, 24 Jun 2026 13:43:09 -0700 Subject: [PATCH 01/16] =?UTF-8?q?fix(a11y):=20reduce=20jsx-a11y=20warnings?= =?UTF-8?q?=20common=2018=E2=86=928,=20studio=2045=E2=86=9231=20(#386)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace role="button" divs/spans with native ), })); diff --git a/web/packages/common/src/components/DataView/StudioDataView.test.tsx b/web/packages/common/src/components/DataView/StudioDataView.test.tsx index 5a00020bef..f2488f4c5a 100644 --- a/web/packages/common/src/components/DataView/StudioDataView.test.tsx +++ b/web/packages/common/src/components/DataView/StudioDataView.test.tsx @@ -153,11 +153,13 @@ vi.mock('@nemo/common/src/components/DataView/internal', () => ({ TableContent: ({ className, onClick, + onKeyDown, }: { className?: string; onClick?: React.MouseEventHandler; + onKeyDown?: React.KeyboardEventHandler; }) => ( - +
{mockRenderedRows.map((cells, rowIdx) => ( @@ -168,7 +170,7 @@ vi.mock('@nemo/common/src/components/DataView/internal', () => ({
- Link {mockFlatRows[rowIdx]?.item.name} + View {mockFlatRows[rowIdx]?.item.name} diff --git a/web/packages/common/src/components/DataView/useRowClick.tsx b/web/packages/common/src/components/DataView/useRowClick.tsx index f570902df8..d9a21ebfba 100644 --- a/web/packages/common/src/components/DataView/useRowClick.tsx +++ b/web/packages/common/src/components/DataView/useRowClick.tsx @@ -72,20 +72,14 @@ function RowKeyboardTarget({ subIndex?: number; }) { return ( - { - if (e.key === 'Enter' || e.key === ' ') { - e.preventDefault(); - onActivate(); - } - }} + onClick={onActivate} /> ); } diff --git a/web/packages/common/src/components/Nebula/index.tsx b/web/packages/common/src/components/Nebula/index.tsx index 16ba46dfd5..7161121f2a 100644 --- a/web/packages/common/src/components/Nebula/index.tsx +++ b/web/packages/common/src/components/Nebula/index.tsx @@ -76,7 +76,12 @@ export const Nebula = ({ className={`relative size-full min-h-[200px] min-w-[200px] ${className}`} data-testid="nv-nebula" > - +