From da847254d56c4198dde2fca8e49aa5c95109245c Mon Sep 17 00:00:00 2001 From: ChloeGarciaMillerand Date: Mon, 27 Jul 2026 14:32:41 +0200 Subject: [PATCH] fix: ESLint errors relating to accessibility (alt attribute and tableEditor components) (#48186) 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? Improvements for screen readers: - Added `alt` attributes to image components - Added `aria-label` attributes and Tooltip to buttons ## What is the current behavior? `aria-label`, `alt` attributes and Tooltip were missing ## What is the new behavior? Buttons have now `aria-label` attributes and Tooltip. Images have `alt` attributes ## Additional context I’ve added `aria-label` attributes to the buttons in the Pagination.tsx component, but these buttons don’t trigger any action. Shouldn’t we be using non-interactive elements here? No visual changes have been made. ## Summary by CodeRabbit * **Accessibility** * Added a tooltip to the “date options” control when the value is nullable. * Improved screen-reader labeling by adding an `aria-label` to the number editor input. * Added explicit `aria-label` text to pagination footer buttons for loading, error, and help/estimate states (and marked the error-state button as disabled). * **UI** * Updated the pagination loading-state button to rely on the button’s built-in loading behavior instead of a custom spinner icon. --------- Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com> --- apps/studio/compat/next/image.tsx | 2 ++ apps/studio/compat/next/legacy/image.tsx | 2 ++ .../grid/components/editor/DateTimeEditor.tsx | 23 +++++++++++++------ .../grid/components/editor/NumberEditor.tsx | 1 + .../footer/pagination/Pagination.tsx | 11 ++++----- 5 files changed, 26 insertions(+), 13 deletions(-) diff --git a/apps/studio/compat/next/image.tsx b/apps/studio/compat/next/image.tsx index c0a931a7041..254c15d1750 100644 --- a/apps/studio/compat/next/image.tsx +++ b/apps/studio/compat/next/image.tsx @@ -135,6 +135,8 @@ const Image = forwardRef(function Image( : style return ( + // alt is spread with rest + // eslint-disable-next-line jsx-a11y/alt-text { diff --git a/apps/studio/compat/next/legacy/image.tsx b/apps/studio/compat/next/legacy/image.tsx index da45e196ca3..e5d657cdd8e 100644 --- a/apps/studio/compat/next/legacy/image.tsx +++ b/apps/studio/compat/next/legacy/image.tsx @@ -140,6 +140,8 @@ const Image = forwardRef(function Image( : undefined return ( + // alt is spread with rest + // eslint-disable-next-line jsx-a11y/alt-text { diff --git a/apps/studio/components/grid/components/editor/DateTimeEditor.tsx b/apps/studio/components/grid/components/editor/DateTimeEditor.tsx index 741bd38c464..ba286d13537 100644 --- a/apps/studio/components/grid/components/editor/DateTimeEditor.tsx +++ b/apps/studio/components/grid/components/editor/DateTimeEditor.tsx @@ -12,6 +12,9 @@ import { Popover, PopoverContent, PopoverTrigger, + Tooltip, + TooltipContent, + TooltipTrigger, } from 'ui' import { Input } from 'ui-patterns/DataInputs/Input' import { TimestampInfo, timestampLocalFormatter } from 'ui-patterns/TimestampInfo' @@ -149,13 +152,19 @@ function BaseEditor({ Set NULL - -