Repository navigation
Conversation
Add explicit tabIndex to raw buttons and role=button call sites across Studio, and decrease the supabase/require-explicit-tabindex baseline from 82 to 0.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughStudio adds explicit keyboard focus behavior across interactive controls, including conditional ChangesStudio keyboard accessibility
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (4)
apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx (1)
149-160: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winMake the hover-only “Only” actions keyboard-visible.
These controls are now tabbable, but pointer-hover styling still prevents keyboard users from seeing or reaching them. Replace
hidden group-hover:flexwith keyboard-compatible visibility, and add a focus-visible opacity rule to theFilterPopoverbutton.
apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx#L149-L160: removehiddenor add a keyboard-visible state such asgroup-focus-within:flex.apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckboxAsync.tsx#L119-L130: apply the same keyboard-visible treatment.apps/studio/components/ui/FilterPopover.tsx#L123-L132: addfocus-visible:opacity-100so the focused button is visible.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx` around lines 149 - 160, Make the tabbable “Only” controls keyboard-visible: in apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx lines 149-160 and DataTableFilterCheckboxAsync.tsx lines 119-130, replace or supplement hidden group-hover:flex with a group-focus-within:flex-compatible visibility treatment; in apps/studio/components/ui/FilterPopover.tsx lines 123-132, add focus-visible:opacity-100 to the FilterPopover button.apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx (1)
298-305: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winReplace the focusable
role="button"code elements with native buttons.These elements are now tabbable but are not keyboard-operable with Enter/Space, and
disabledonly changestabIndexwithout preventing clicks. Prefer native disabled buttons, or implement keyboard activation plusaria-disabledand an explicit disabled guard.
apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx#L298-L305: Fix theNEXT_PUBLIC_preset control.apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx#L309-L314: Fix theVITE_PUBLIC_preset control.apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx#L320-L327: Fix thePUBLIC_preset control.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx` around lines 298 - 305, Replace the focusable code elements used for the NEXT_PUBLIC_, VITE_PUBLIC_, and PUBLIC_ preset controls in apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx at lines 298-305, 309-314, and 320-327 with native buttons. Preserve each field.onChange preset value, use the native disabled state when disabled, and remove the custom role, tabIndex, and click-only accessibility handling.apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/OrgMenuItem.tsx (1)
42-46: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winDisabled navigation remains keyboard-activatable in both menu components.
The new
tabIndexhandling covers only submenu buttons; disabled items rendered as links remain focusable and navigable becausepointer-events-nonedoes not affect keyboard input.
apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/OrgMenuItem.tsx#L42-L46: apply disabled semantics to the<Link>branch.apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/TopLevelRouteItem.tsx#L43-L47: apply the same disabled handling to route links.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/OrgMenuItem.tsx` around lines 42 - 46, Disabled links remain keyboard-focusable and navigable despite pointer-events styling. Update the Link branches in apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/OrgMenuItem.tsx:42-46 and apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/TopLevelRouteItem.tsx:43-47 to apply the same disabled semantics as the menu buttons, including removing disabled items from tab navigation and preventing their keyboard activation/navigation.apps/studio/components/layouts/Tabs/SortableTab.tsx (1)
117-134: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftThe tab close controls need a valid keyboard interaction model.
Both changes add a focusable
role="button"inside aTabsTriggerbutton, without keyboard activation or visible focus styling.
apps/studio/components/layouts/Tabs/SortableTab.tsx#L117-L134: move the close control outsideTabsTriggeror replace it with a properly keyboard-operable structure.apps/studio/components/layouts/Tabs/Tabs.tsx#L231-L247: apply the same structural fix to the new-tab close control.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/studio/components/layouts/Tabs/SortableTab.tsx` around lines 117 - 134, The close controls are focusable role="button" elements nested inside TabsTrigger buttons without keyboard activation or focus styling. In apps/studio/components/layouts/Tabs/SortableTab.tsx lines 117-134, move the close control outside TabsTrigger or restructure it into a properly keyboard-operable control with visible focus styling; apply the same structural fix to the new-tab close control in apps/studio/components/layouts/Tabs/Tabs.tsx lines 231-247.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/studio/components/interfaces/Support/AttachmentUpload.tsx`:
- Around line 248-250: Add an accessible name to the icon-only button in the
attachment upload component by adding aria-label="Add attachment" or equivalent
visually hidden text. Keep its existing button behavior and keyboard focus
configuration unchanged.
In `@apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx`:
- Line 85: Update the Badge in ModelSelector so it no longer presents as an
actionable button without activation behavior: remove role="button" and
tabIndex={0}, or replace it with a genuinely interactive button wired to click,
Enter, and Space handling. Preserve the warning badge’s passive tooltip
behavior.
In `@apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx`:
- Around line 217-220: Update SeverityButton and its callers to accept the
isDisabled state, apply it to the button’s disabled attribute, and set tabIndex
to -1 when disabled while preserving the existing enabled behavior. Ensure
unavailable severity controls cannot receive keyboard focus or change local
state when the required project/org context is missing.
---
Outside diff comments:
In
`@apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx`:
- Around line 298-305: Replace the focusable code elements used for the
NEXT_PUBLIC_, VITE_PUBLIC_, and PUBLIC_ preset controls in
apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx
at lines 298-305, 309-314, and 320-327 with native buttons. Preserve each
field.onChange preset value, use the native disabled state when disabled, and
remove the custom role, tabIndex, and click-only accessibility handling.
In
`@apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/OrgMenuItem.tsx`:
- Around line 42-46: Disabled links remain keyboard-focusable and navigable
despite pointer-events styling. Update the Link branches in
apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/OrgMenuItem.tsx:42-46
and
apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/TopLevelRouteItem.tsx:43-47
to apply the same disabled semantics as the menu buttons, including removing
disabled items from tab navigation and preventing their keyboard
activation/navigation.
In `@apps/studio/components/layouts/Tabs/SortableTab.tsx`:
- Around line 117-134: The close controls are focusable role="button" elements
nested inside TabsTrigger buttons without keyboard activation or focus styling.
In apps/studio/components/layouts/Tabs/SortableTab.tsx lines 117-134, move the
close control outside TabsTrigger or restructure it into a properly
keyboard-operable control with visible focus styling; apply the same structural
fix to the new-tab close control in apps/studio/components/layouts/Tabs/Tabs.tsx
lines 231-247.
In
`@apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx`:
- Around line 149-160: Make the tabbable “Only” controls keyboard-visible: in
apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx
lines 149-160 and DataTableFilterCheckboxAsync.tsx lines 119-130, replace or
supplement hidden group-hover:flex with a group-focus-within:flex-compatible
visibility treatment; in apps/studio/components/ui/FilterPopover.tsx lines
123-132, add focus-visible:opacity-100 to the FilterPopover button.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: de3ea3b4-8942-456b-ae9c-4015b083d24b
📒 Files selected for processing (65)
apps/studio/.github/eslint-rule-baselines.jsonapps/studio/components/grid/components/grid/ColumnHeader.tsxapps/studio/components/grid/components/header/sort/SortRow.tsxapps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsxapps/studio/components/interfaces/BranchManagement/EdgeFunctionsDiffPanel.tsxapps/studio/components/interfaces/BranchManagement/WorkflowLogs.tsxapps/studio/components/interfaces/Connect/OrganizationSelector.tsxapps/studio/components/interfaces/ConnectSheet/ConnectConfigSection.tsxapps/studio/components/interfaces/ConnectSheet/ConnectionParameters.tsxapps/studio/components/interfaces/Database/EnumeratedTypes/EnumeratedTypeValueRow.tsxapps/studio/components/interfaces/Database/Policies/PolicyEditorPanel/PolicyEditorPanelHeader.tsxapps/studio/components/interfaces/Database/Privileges/PrivilegesTable.tsxapps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DuckLake/Fields.tsxapps/studio/components/interfaces/Database/Replication/DestinationPanel/ReadReplicaForm/ReadReplicaPricingDialog.tsxapps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus/SlotLagMetrics.tsxapps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus/SlotStatus.tsxapps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus/TableReplicationRow.tsxapps/studio/components/interfaces/Database/Roles/RoleRow.tsxapps/studio/components/interfaces/Database/Roles/RolesList.tsxapps/studio/components/interfaces/Database/Triggers/TriggerSheet.tsxapps/studio/components/interfaces/ExplainVisualizer/ExplainVisualizer.NodeRow.tsxapps/studio/components/interfaces/Functions/CommandRender.tsxapps/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsxapps/studio/components/interfaces/Integrations/Integration/MarkdownContent.tsxapps/studio/components/interfaces/Integrations/Marketplace/MarketplaceFilterBar.tsxapps/studio/components/interfaces/LogDrains/LogDrainsCard.tsxapps/studio/components/interfaces/Observability/ServiceHealthTable.tsxapps/studio/components/interfaces/Organization/OrganizationCard.tsxapps/studio/components/interfaces/Organization/PrivateApps/Apps/ViewAppSheet/ViewAppSheetInfo.tsxapps/studio/components/interfaces/ProjectAPIDocs/FirstLevelNav.tsxapps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.Layout.tsxapps/studio/components/interfaces/ProjectHome/ConnectSection.tsxapps/studio/components/interfaces/ProjectHome/SortableSection.tsxapps/studio/components/interfaces/QueryInsights/QueryInsightsChart/QueryInsightsChart.tsxapps/studio/components/interfaces/QueryPerformance/QueryPerformanceMetrics.tsxapps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsxapps/studio/components/interfaces/Storage/BucketFilePickerDialog/BucketFilePickerHeader.tsxapps/studio/components/interfaces/Storage/StorageExplorer/FileExplorerRowEditing.tsxapps/studio/components/interfaces/Storage/StorageExplorer/MoveItemsModal.tsxapps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesBucketsSection.tsxapps/studio/components/interfaces/Storage/StoragePolicies/StoragePolicyEditorModalTitle.tsxapps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.ValidateSizeLimit.tsxapps/studio/components/interfaces/Support/AttachmentUpload.tsxapps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImportPreview.tsxapps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsxapps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionDetailsLayout.tsxapps/studio/components/layouts/Navigation/LayoutHeader/FeedbackDropdown/FeedbackWidget.tsxapps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/OrgMenuItem.tsxapps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/TopLevelRouteItem.tsxapps/studio/components/layouts/TableEditorLayout/EntityListItem.tsxapps/studio/components/layouts/Tabs/CollapseButton.tsxapps/studio/components/layouts/Tabs/SortableTab.tsxapps/studio/components/layouts/Tabs/Tabs.tsxapps/studio/components/ui/AIAssistantPanel/ModelSelector.tsxapps/studio/components/ui/Charts/ChartHighlightActions.tsxapps/studio/components/ui/Charts/ComposedChart.utils.tsxapps/studio/components/ui/ComputeBadgeWrapper.tsxapps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsxapps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckboxAsync.tsxapps/studio/components/ui/DevToolbar/ProjectStatusTab.tsxapps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsxapps/studio/components/ui/FeaturePreviewBadge.tsxapps/studio/components/ui/FilterPopover.tsxapps/studio/components/ui/PasswordStrengthBar.tsxapps/studio/components/ui/SingleStat.tsx
🎭 Playwright Test Results (next)Details
Flaky testsFeatures › column-editor-types.spec.ts › column editor complex types › FK selector allows and creates a relation between two matching array columns Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
dnd-kit's attributes already include tabIndex; specifying it before the spread caused TS2783.
There was a problem hiding this comment.
Pull request overview
A Studio accessibility cleanup that eliminates the remaining ratcheted supabase/require-explicit-tabindex violations by adding explicit tabIndex to raw button-like elements (and -1 when disabled), and then updates the Studio ESLint baseline to lock the rule at zero.
Changes:
- Added explicit
tabIndex={0}(or disabled →-1) across many Studio<button>/role="button"call sites to ensure consistent Safari keyboard focus behavior. - Updated a handful of related button attributes (e.g., some
type="button"additions) to better match expected interaction semantics. - Dropped the Studio ratchet baseline for
supabase/require-explicit-tabindexfrom 82 to 0.
Reviewed changes
Copilot reviewed 65 out of 65 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/studio/components/ui/SingleStat.tsx | Adds explicit tabIndex to clickable stat button |
| apps/studio/components/ui/PasswordStrengthBar.tsx | Adds explicit tabIndex to “Generate a password” button |
| apps/studio/components/ui/FilterPopover.tsx | Adds explicit tabIndex to “Only” button |
| apps/studio/components/ui/FeaturePreviewBadge.tsx | Adds explicit tabIndex to feature preview badge button |
| apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx | Adds explicit tabIndex for reset + severity buttons (incl. disabled handling) |
| apps/studio/components/ui/DevToolbar/ProjectStatusTab.tsx | Adds explicit tabIndex for reset button (incl. disabled handling) |
| apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckboxAsync.tsx | Adds explicit tabIndex to filter option button |
| apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsx | Adds explicit tabIndex to expand + filter option buttons |
| apps/studio/components/ui/ComputeBadgeWrapper.tsx | Adds explicit tabIndex to upgrade CTA button |
| apps/studio/components/ui/Charts/ComposedChart.utils.tsx | Adds explicit tabIndex to chart label toggle button |
| apps/studio/components/ui/Charts/ChartHighlightActions.tsx | Adds explicit tabIndex for dropdown action button (disabled handling) |
| apps/studio/components/ui/AIAssistantPanel/ModelSelector.tsx | Adds explicit tabIndex to “Upgrade” badge inside model list |
| apps/studio/components/layouts/Tabs/Tabs.tsx | Adds explicit tabIndex to close affordance in “New” tab trigger |
| apps/studio/components/layouts/Tabs/SortableTab.tsx | Adds explicit tabIndex to close affordance in sortable tab |
| apps/studio/components/layouts/Tabs/CollapseButton.tsx | Adds explicit tabIndex to collapse tabs button |
| apps/studio/components/layouts/TableEditorLayout/EntityListItem.tsx | Adds explicit tabIndex to button-like entity link |
| apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/TopLevelRouteItem.tsx | Adds explicit tabIndex with disabled handling |
| apps/studio/components/layouts/ProjectLayout/LayoutHeader/MobileMenuContent/OrgMenuItem.tsx | Adds explicit tabIndex with disabled handling |
| apps/studio/components/layouts/Navigation/LayoutHeader/FeedbackDropdown/FeedbackWidget.tsx | Adds explicit tabIndex to small notification button |
| apps/studio/components/layouts/EdgeFunctionsLayout/EdgeFunctionDetailsLayout.tsx | Adds explicit tabIndex to hovercard trigger button |
| apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/TableEditor/Column.tsx | Adds explicit tabIndex to drag handle / actions |
| apps/studio/components/interfaces/TableGridEditor/SidePanelEditor/SpreadsheetImport/SpreadsheetImportPreview.tsx | Adds explicit tabIndex to error expand button |
| apps/studio/components/interfaces/Support/AttachmentUpload.tsx | Adds explicit tabIndex to remove/upload buttons |
| apps/studio/components/interfaces/Storage/StorageSettings/StorageSettings.ValidateSizeLimit.tsx | Adds explicit tabIndex with validating (disabled) handling |
| apps/studio/components/interfaces/Storage/StoragePolicies/StoragePolicyEditorModalTitle.tsx | Adds explicit tabIndex to back button |
| apps/studio/components/interfaces/Storage/StoragePolicies/StoragePoliciesBucketsSection.tsx | Adds explicit tabIndex to collapsible trigger button |
| apps/studio/components/interfaces/Storage/StorageExplorer/MoveItemsModal.tsx | Removes hidden submit button from tab order via tabIndex={-1} |
| apps/studio/components/interfaces/Storage/StorageExplorer/FileExplorerRowEditing.tsx | Removes hidden submit button from tab order via tabIndex={-1} |
| apps/studio/components/interfaces/Storage/BucketFilePickerDialog/BucketFilePickerHeader.tsx | Adds explicit tabIndex to breadcrumb button |
| apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx | Adds explicit tabIndex to clickable code presets (disabled handling) |
| apps/studio/components/interfaces/QueryPerformance/QueryPerformanceMetrics.tsx | Adds explicit tabIndex to tooltip icon buttons |
| apps/studio/components/interfaces/QueryInsights/QueryInsightsChart/QueryInsightsChart.tsx | Adds explicit tabIndex to series toggle buttons |
| apps/studio/components/interfaces/ProjectHome/SortableSection.tsx | Adds type="button" + explicit tabIndex to drag handle |
| apps/studio/components/interfaces/ProjectHome/ConnectSection.tsx | Adds explicit tabIndex matching disabled state for connect actions |
| apps/studio/components/interfaces/ProjectAPIDocs/SecondLevelNav.Layout.tsx | Adds explicit tabIndex to API docs nav items |
| apps/studio/components/interfaces/ProjectAPIDocs/FirstLevelNav.tsx | Adds explicit tabIndex to API docs nav + subsection items |
| apps/studio/components/interfaces/Organization/PrivateApps/Apps/ViewAppSheet/ViewAppSheetInfo.tsx | Adds type="button" + explicit tabIndex to copy button |
| apps/studio/components/interfaces/Organization/OrganizationCard.tsx | Adds explicit tabIndex with disabled handling |
| apps/studio/components/interfaces/Observability/ServiceHealthTable.tsx | Adds explicit tabIndex to info tooltip button |
| apps/studio/components/interfaces/LogDrains/LogDrainsCard.tsx | Adds type="button" + explicit tabIndex to card button |
| apps/studio/components/interfaces/Integrations/Marketplace/MarketplaceFilterBar.tsx | Adds explicit tabIndex to filter controls |
| apps/studio/components/interfaces/Integrations/Integration/MarkdownContent.tsx | Adds type="button" + explicit tabIndex to expand/collapse |
| apps/studio/components/interfaces/Functions/EdgeFunctionsListItem.tsx | Adds explicit tabIndex to copy button |
| apps/studio/components/interfaces/Functions/CommandRender.tsx | Adds explicit tabIndex to copy button |
| apps/studio/components/interfaces/ExplainVisualizer/ExplainVisualizer.NodeRow.tsx | Adds explicit tabIndex matching expandable/disabled state |
| apps/studio/components/interfaces/Database/Triggers/TriggerSheet.tsx | Adds explicit tabIndex to button selection control |
| apps/studio/components/interfaces/Database/Roles/RolesList.tsx | Adds explicit tabIndex to filter toggle buttons |
| apps/studio/components/interfaces/Database/Roles/RoleRow.tsx | Adds explicit tabIndex to collapsible trigger button |
| apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus/TableReplicationRow.tsx | Adds explicit tabIndex to inline “View error” button |
| apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus/SlotStatus.tsx | Adds explicit tabIndex to info popover trigger |
| apps/studio/components/interfaces/Database/Replication/ReplicationPipelineStatus/SlotLagMetrics.tsx | Adds explicit tabIndex to info tooltip trigger |
| apps/studio/components/interfaces/Database/Replication/DestinationPanel/ReadReplicaForm/ReadReplicaPricingDialog.tsx | Adds explicit tabIndex to dialog trigger link-button |
| apps/studio/components/interfaces/Database/Replication/DestinationPanel/DestinationForm/DuckLake/Fields.tsx | Adds explicit tabIndex to radio-like mode buttons |
| apps/studio/components/interfaces/Database/Privileges/PrivilegesTable.tsx | Adds explicit tabIndex to column-name button |
| apps/studio/components/interfaces/Database/Policies/PolicyEditorPanel/PolicyEditorPanelHeader.tsx | Adds explicit tabIndex to tools toggle button |
| apps/studio/components/interfaces/Database/EnumeratedTypes/EnumeratedTypeValueRow.tsx | Adds explicit tabIndex with disabled handling |
| apps/studio/components/interfaces/ConnectSheet/ConnectionParameters.tsx | Adds explicit tabIndex to copy buttons |
| apps/studio/components/interfaces/ConnectSheet/ConnectConfigSection.tsx | Adds explicit tabIndex to mode selector buttons |
| apps/studio/components/interfaces/Connect/OrganizationSelector.tsx | Adds explicit tabIndex with disabled handling |
| apps/studio/components/interfaces/BranchManagement/WorkflowLogs.tsx | Adds explicit tabIndex with disabled handling on run selection |
| apps/studio/components/interfaces/BranchManagement/EdgeFunctionsDiffPanel.tsx | Adds explicit tabIndex to file selector buttons |
| apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewModal.tsx | Adds explicit tabIndex to feature selection button |
| apps/studio/components/grid/components/header/sort/SortRow.tsx | Adds explicit tabIndex to drag handle button |
| apps/studio/components/grid/components/grid/ColumnHeader.tsx | Adds explicit tabIndex to header action button |
| apps/studio/.github/eslint-rule-baselines.json | Updates supabase/require-explicit-tabindex baseline from 82 → 0 |
Name the add-attachment control, drop a fake button role on an info badge, keep disabled severity toggles out of tab order, use tabIndex=-1 for tab close affordances, add Enter/Space on Vercel prefix presets, and make hover-only “Only” filter actions visible on keyboard focus.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/studio/components/layouts/Tabs/SortableTab.tsx (1)
117-134: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy liftProvide a keyboard-accessible tab-close control.
Both close controls are exposed as buttons but are skipped by tab navigation and only respond to pointer events. Use real sibling
<button>elements with keyboard activation, or provide another accessible close path before applyingtabIndex={-1}.
apps/studio/components/layouts/Tabs/SortableTab.tsx#L117-L134: fix the nested tab-close control.apps/studio/components/layouts/Tabs/Tabs.tsx#L231-L248: apply the same fix to the “New” tab close control.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/studio/components/layouts/Tabs/SortableTab.tsx` around lines 117 - 134, The nested tab-close control in SortableTab.tsx lines 117-134 and the “New” tab close control in Tabs.tsx lines 231-248 are skipped by keyboard navigation and only handle pointer events. Replace each with a real sibling button or otherwise provide an accessible keyboard close path, preserving the existing onClose behavior and event isolation from tab activation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@apps/studio/components/layouts/Tabs/SortableTab.tsx`:
- Around line 117-134: The nested tab-close control in SortableTab.tsx lines
117-134 and the “New” tab close control in Tabs.tsx lines 231-248 are skipped by
keyboard navigation and only handle pointer events. Replace each with a real
sibling button or otherwise provide an accessible keyboard close path,
preserving the existing onClose behavior and event isolation from tab
activation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 030f316f-d9d0-4f1a-8659-61528a7bc329
📒 Files selected for processing (9)
apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsxapps/studio/components/interfaces/Support/AttachmentUpload.tsxapps/studio/components/layouts/Tabs/SortableTab.tsxapps/studio/components/layouts/Tabs/Tabs.tsxapps/studio/components/ui/AIAssistantPanel/ModelSelector.tsxapps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckbox.tsxapps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckboxAsync.tsxapps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsxapps/studio/components/ui/FilterPopover.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
- apps/studio/components/ui/FilterPopover.tsx
- apps/studio/components/ui/DevToolbar/ResourceWarningsTab.tsx
- apps/studio/components/ui/DataTable/DataTableFilters/DataTableFilterCheckboxAsync.tsx
- apps/studio/components/interfaces/Support/AttachmentUpload.tsx
- apps/studio/components/interfaces/Settings/Integrations/VercelIntegration/VercelIntegrationConnectionForm.tsx
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 65 out of 65 changed files in this pull request and generated 6 comments.
Comments suppressed due to low confidence (1)
apps/studio/components/layouts/Navigation/LayoutHeader/FeedbackDropdown/FeedbackWidget.tsx:260
- This remove-screenshot icon button is now explicitly focusable but still lacks an accessible name. Adding an
aria-label(andtype="button") makes it discoverable to assistive tech.
This comment has been minimized.
This comment has been minimized.
| )} | ||
| {...attributes} | ||
| {...listeners} | ||
| tabIndex={0} |
There was a problem hiding this comment.
Needs to be under dnd’s {...attributes}
| ref={setActivatorNodeRef} | ||
| {...attributes} | ||
| {...listeners} | ||
| tabIndex={0} |
There was a problem hiding this comment.
Needs to be under dnd’s {...attributes}
| )} | ||
| <span | ||
| role="button" | ||
| tabIndex={-1} |
There was a problem hiding this comment.
By design. See TabsTrigger.
There was a problem hiding this comment.
I believe we still have issues in this component:
- The tab itself is actually 2 nested buttons (a
div role="button"that contains abutton) - The tab also includes the close button
I think the proper markup would be to make the root div in this file a simple div without the role="button" and to move the close button as one of its direct children (a sibling of the TabsTrigger). Maybe @czenko can confirm? That should probably be addressed in a dedicated PR though
There was a problem hiding this comment.
Correct: this would cause another violation of nested interactive elements.
See source: https://dequeuniversity.com/rules/axe/4.8/nested-interactive
There was a problem hiding this comment.
Good catch. I've addressed separately and based off master since this is a preexisting issue. Mind giving it a review? #48101.
We can merge that in first, then I will merge master into here.
| <button | ||
| <Button | ||
| type="button" | ||
| variant="text" |
There was a problem hiding this comment.
Changed the variant to inherit proper outline.
|
|
||
| // Remove the foreign key relation | ||
| await page.getByRole('button', { name: 'Remove' }).click() | ||
| await page.getByRole('button', { name: 'Remove', exact: true }).click() |
There was a problem hiding this comment.
To avoid Playwright getting confused with the Remove column buttons too.
Promote the shared rule to error, leave www/docs/design-system on warn until those apps are swept, turn the rule off for Studio test mocks (matching the old ratchet), and fix the learn/ui-library call sites CI already caught.
…atchet-debt-82 Resolve SortableTab/Tabs conflicts by keeping the nested-button fix from #48101; the branch's tabIndex={-1} nits on those closes are superseded.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 68 out of 68 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
apps/studio/components/ui/Charts/ChartHighlightActions.tsx:145
DropdownMenuItemmanages roving focus by controllingtabIndexon the underlying focusable element. Because this item usesasChild, adding an explicittabIndex={-1}on the child<button>overrides Radix’stabIndexmanagement, which can break arrow-key navigation and initial focus within the dropdown menu. Consider removing the nested<button>and handling selection directly onDropdownMenuItem(so Radix can own focus/tabIndex).
Braintrust eval report
|
## What kind of change does this PR introduce? Accessibility / lint hardening (Safari keyboard focus). ## What is the current behavior? `supabase/require-explicit-tabindex` is `'warn'`. Studio’s ratchet was at 0 but the rule was still ratcheted; www / docs / design-system still had raw `<button>` / `role="button"` call sites without an explicit `tabIndex`. [DEPR-627](https://linear.app/supabase/issue/DEPR-627) · follow-up to #47984 / #48040 ## What is the new behavior? - Shared config: `'supabase/require-explicit-tabindex': 'error'` - Swept www / docs / design-system (+ Studio test fixtures the ratchet skipped) - Removed the rule from the Studio ratchet + baselines ## To test Prefer **Safari**. This PR only adds explicit `tabIndex` to raw `<button>` / `role="button"` call sites — not links, and not controls that already go through `Button` from `ui`. ### Marketing (`www`) ([staging link](https://zone-www-dot-com-git-danny-depr-627-promote-req-7ae43c-supabase.vercel.app/)) - [x] Homepage frameworks / dashboard feature tabs — Tab through each tab button - [x] Product pages (e.g. `/auth`, `/database`) — section tab switchers - [x] Narrow viewport — open the hamburger; Tab through menu buttons - [x] `/partners/catalog` — filter / view controls - [x] Blog view toggle (list ↔ grid) ### Docs ([staging link](https://docs-git-danny-depr-627-promote-require-explici-25e46d-supabase.vercel.app/)) - [x] **Desktop (≥ lg):** top-right **⋯ menu** (hamburger icon) — opens a dropdown that includes Theme. Not a separate theme button. - [x] **Mobile (< lg):** top-right **hamburger** opens the sheet; close (X) is the raw button we tagged. Theme inside the sheet uses `ThemeToggle` / `DropdownMenuTrigger` from `ui` (already supposed to set `tabIndex`). - [x] **Code blocks** — copy / language controls - [x] **Is this helpful?** — X / check are `Button` from `ui` (should already Tab). After voting **while signed in**, the follow-up “What went well?” / “How can we improve?” text button is the raw one we tagged. - [x] **AI Tools → Copy as Markdown** (right rail on a guide) — this is the only GuidesSidebar control this PR changed. “On this page” TOC items are **links**, not covered by this lint. - [x] **Reference docs** (e.g. JS client reference) — section headers that expand/collapse in the left nav (`Collapsible.Trigger`) - [x] **Troubleshooting index** — type in the search field, then Tab to the **clear (X)** control ### Dashboard (`studio`) No production UI changes in this PR (tests + lint config only). Quick Safari smoke that prior tabindex work still holds: - [x] Project sidebar — Tab through primary nav links - [x] Settings → General — Tab through inputs / buttons - [x] Storage → Files — Tab a bucket row / file actions
…fomap-entry-for-pitr-archiving-stale' into hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale * origin/hunleyd/indata-979-studio-lintinfomap-entry-for-pitr-archiving-stale: (35 commits) chore: simplify CPU messaging for compute sizes (#48109) chore(studio): add valtio and react-hook-form ESLint ratchet rules (#48037) feat: Add ai/python federated content and data (#48043) feat: Add ai-skills federated content and data (#48045) feat: Add deployment/ci federated content and data (#48041) fix(studio): wire up siwc-enabled query param opt-in on sign-in/sign-up (#48126) fix(studio): stop stacking overlaid area series in report charts (#48034) Update Dev toolbar to support filtering feature flags (#48137) Update dev toolbar to support mocking org restrictions (#48136) feat: Add terraform federated content and data (#48010) Chore/add sessions database connections (#48094) fix(studio): guard panel collapse/resize on narrow viewports (#48098) Landing page agent focus (#47989) fix(studio): chip away explicit-tabindex ratchet debt (#48040) fix(studio): untangle nested buttons in editor tabs (#48101) fix(docs): broken link (#48117) docs: add VS Code to the AI coding agent plugin install picker (#48108) docs: add Kimi Code to MCP and AI coding agent plugin setup (#48099) fix: preserve function responses (#47920) fix(assistant): SQL approval buttons do nothing (#48102) ...
What kind of change does this PR introduce?
A11y cleanup follow-up to #47984 / DEPR-626.
What is the current behavior?
Studio had 82 ratcheted
supabase/require-explicit-tabindexviolations (raw<button>/role="button"without explicittabIndex).What is the new behavior?
tabIndex={0}(or disabled →-1) on those Studio call sites across nav,components/ui, Database, Storage, and the remainderwarnfor now — promoting toerror(and sweeping www/docs/design-system) is a follow-upKeyboardSensor, and an E2E locator tightened afteraria-label="Remove column"Prefer migrating to
Buttonfromuiin future touch-ups; this PR takes the minimal path so Studio debt can stay at zero.Additional context
Batches landed together so baseline conflicts stayed simple while chipping away:
components/uisharedOut of scope / intentional deferrals
supabase/require-explicit-tabindexto a lint error (follow-up after www/docs/design-system sweeps)tabIndex={-1}; context menu still closes tabs)/project/<ref>/apiredirect)Reviewer notes
<button>/role="button"without atabIndexprop.Buttonfromuialready bakes this intabIndex={-1}is intentional for disabled controls, in-menu / roving-focus children, and hover-only tab closetabIndexafter{...attributes}so it isn’t overwritten (TS2783)To test
Use Safari with macOS Keyboard navigation off (System Settings → Keyboard). Chrome once for a sanity pass. For each surface below: Tab until the control is focused, then activate with Enter/Space where relevant.
API Docs side panel (Table Editor → open a table → API docs)
/project/<ref>/api(that redirects to Data API docs; language ToggleGroup uses arrow keys; links are out of scope)Integrations → Marketplace
/org/<slug>/integrationsor project integrations marketplaceTable Editor → create a table → Columns
Project Home — section drag handles
Storage → Policies — expand/collapse bucket list chevron (design-system focus ring, no stuck grey open bg)
Support form (Help → Support) — attachment remove (×) and add-attachment control when visible
Disabled controls should be skipped by Tab.
Summary by CodeRabbit
tabIndex) across many interactive controls (menus, tabs, tables, charts, dialogs, navigation, and form actions).type="button"on relevant controls to prevent unintended submissions, and refined keyboard focus behavior for various toggles and copy/remove actions.