From cea246d195329043bb4f482cc99d1d2d75887502 Mon Sep 17 00:00:00 2001 From: ChloeGarciaMillerand Date: Fri, 24 Jul 2026 10:47:14 +0200 Subject: [PATCH] Fix: improve accessibility for icon buttons (Table Editor menu) (#47639) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Bug fix (accessibility improvement) ## What is the current behavior? Icon-only buttons do not have explicit accessible names for screen readers or tooltips. ## What is the new behavior? All icon-only buttons now have explicit accessible names using visually hidden text (sr-only), ensuring proper screen reader support. ## Additional context Tooltip text is preserved or added for visual users. No visual changes were introduced. ## Summary by CodeRabbit * **Accessibility Improvements** * Updated table editor action controls with clearer, context-aware `aria-label`s (e.g., “Add new column”, “More options for …”, “New table”). * **UI Refinements** * Added hover tooltips to key table editor actions, including add-column, more-options dropdown triggers, and create-new-table button, improving discoverability and guidance. --- .../grid/components/grid/AddColumn.tsx | 15 ++++++++-- .../TableGridEditor/GridHeaderActions.tsx | 21 ++++++++------ .../TableEditorLayout/EntityListItem.tsx | 28 +++++++++++-------- .../features/queue-table-operations.spec.ts | 2 +- 4 files changed, 44 insertions(+), 22 deletions(-) diff --git a/apps/studio/components/grid/components/grid/AddColumn.tsx b/apps/studio/components/grid/components/grid/AddColumn.tsx index d877d2d2d42..d10053b0daa 100644 --- a/apps/studio/components/grid/components/grid/AddColumn.tsx +++ b/apps/studio/components/grid/components/grid/AddColumn.tsx @@ -1,6 +1,6 @@ import { Plus } from 'lucide-react' import type { CalculatedColumn } from 'react-data-grid' -import { Button } from 'ui' +import { Button, Tooltip, TooltipContent, TooltipTrigger } from 'ui' import { ADD_COLUMN_KEY } from '../../constants' import { DefaultFormatter } from '../formatter/DefaultFormatter' @@ -32,7 +32,18 @@ const AddColumnHeader = () => { return (
-
) } diff --git a/apps/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx b/apps/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx index 0e8f86367dc..58b7588cab0 100644 --- a/apps/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx +++ b/apps/studio/components/interfaces/TableGridEditor/GridHeaderActions.tsx @@ -332,14 +332,19 @@ export const GridHeaderActions = ({ table, isRefetching }: GridHeaderActionsProp - -