Repository navigation
Conversation
Sweep www/docs/design-system (and Studio test fixtures the ratchet excluded) so the shared Safari keyboard-focus lint can be a hard error instead of a warn, and drop it from the Studio ratchet.
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe change adds explicit ChangesExplicit tabindex enforcement
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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
🧹 Nitpick comments (1)
apps/www/app/state-of-startups/components/YearToggle.tsx (1)
25-29: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winUse roving focus for the radio group.
All
role="radio"options receivetabIndex={0}, creating multiple tab stops without arrow-key navigation. Keep only the active option attabIndex={0}, move inactive options to-1, and add arrow-key focus/selection handling—or remove the radio roles if these are intended to behave as independent buttons.🤖 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/www/app/state-of-startups/components/YearToggle.tsx` around lines 25 - 29, Update the radio options in the YearToggle component so only the active option has tabIndex={0} and inactive options use -1, then add arrow-key handling that moves focus and selection among options while preserving the current selection behavior; alternatively, remove the radio roles if these controls are intended to remain independent buttons.
🤖 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/www/app/`(home)/_components/DashboardFeaturesSection.tsx:
- Line 38: Complete roving-tab keyboard navigation in
DashboardFeaturesSection.tsx (38-38), ApiSectionClient.tsx (123-123), and
IntegratesSectionClient.tsx (121-121): add key handling that updates the
respective active index for ArrowLeft/ArrowRight, preferably wrapping between
tabs, and Home/End to select the first/last tab; preserve the existing tabIndex
behavior and focus the newly active tab.
In `@apps/www/app/`(home)/_components/FrameworksSectionClient.tsx:
- Line 61: Implement roving-tabindex arrow-key navigation for every affected
tablist: FrameworksSectionClient.tsx (61-61), RLSSectionClient.tsx (114-114),
EnterpriseFormQuotes.tsx (13-13), Repos.tsx (19-19), TimedAccordionPanels.tsx
(39-39), TimedAccordionSection.tsx (28-28), TimedTabsSection.tsx (24-24), and
TabsWithHighlights.tsx (101-101). Add handlers so ArrowLeft/ArrowUp and
ArrowRight/ArrowDown move focus and activate the previous or next tab, while
Home and End move to the first or last tab, with appropriate wrapping or
existing component behavior preserved.
In `@apps/www/components/Nav/RightClickBrandLogo.tsx`:
- Line 130: Remove the explicit tabIndex={0} from the child rendered by
DropdownMenuItem asChild in the right-click brand logo menu, allowing the menu’s
roving tabindex focus behavior to control keyboard navigation without adding an
extra tab stop.
---
Nitpick comments:
In `@apps/www/app/state-of-startups/components/YearToggle.tsx`:
- Around line 25-29: Update the radio options in the YearToggle component so
only the active option has tabIndex={0} and inactive options use -1, then add
arrow-key handling that moves focus and selection among options while preserving
the current selection behavior; alternatively, remove the radio roles if these
controls are intended to remain independent buttons.
🪄 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: 982c80d0-78c3-402f-897c-3a7774671a78
⛔ Files ignored due to path filters (1)
apps/design-system/__registry__/default/block/chart-bar-interactive.tsxis excluded by!apps/design-system/__registry__/**
📒 Files selected for processing (89)
apps/design-system/components/click-counter.tsxapps/design-system/components/color-palette.tsxapps/design-system/registry/default/block/chart-bar-interactive.tsxapps/design-system/registry/default/example/form-patterns-pagelayout.tsxapps/design-system/registry/default/example/form-patterns-sidepanel.tsxapps/design-system/registry/default/example/page-layout-auth-emails.tsxapps/design-system/registry/default/example/page-layout-edge-function.tsxapps/design-system/registry/default/example/page-nav-demo.tsxapps/design-system/registry/default/example/success-check-selected.tsxapps/docs/components/ApiSchemaOption.tsxapps/docs/components/AuthSmsProviderConfig/AuthSmsProviderConfig.tsxapps/docs/components/Extensions/Extensions.tsxapps/docs/components/Feedback/Feedback.tsxapps/docs/components/GuidesSidebar.tsxapps/docs/components/Navigation/NavigationMenu/GlobalMobileMenu.tsxapps/docs/components/Navigation/NavigationMenu/TopNavBar.tsxapps/docs/components/Navigation/NavigationMenu/TopNavDropdown.tsxapps/docs/components/Options.tsxapps/docs/components/TerraformProviderSchema.tsxapps/docs/features/directives/CodeSample.client.tsxapps/docs/features/docs/Reference.navigation.client.tsxapps/docs/features/docs/Troubleshooting.ui.client.tsxapps/docs/features/ui/CodeBlock/CodeBlock.client.tsxapps/docs/features/ui/PromptPanel.tsxapps/docs/layouts/MainSkeleton.tsxapps/studio/.github/eslint-rule-baselines.jsonapps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTab.test.tsxapps/studio/components/interfaces/LocalDropdown.test.tsxapps/studio/components/interfaces/Platform/Webhooks/PlatformWebhooksEndpointDetails.test.tsxapps/studio/components/interfaces/Settings/General/Project.test.tsxapps/studio/components/interfaces/Storage/__tests__/DeleteBucketModal.test.tsxapps/studio/components/interfaces/Storage/__tests__/EditBucketModal.test.tsxapps/studio/components/interfaces/Storage/__tests__/EmptyBucketModal.test.tsxapps/studio/components/layouts/ProjectLayout/index.test.tsxapps/studio/components/ui/AIAssistantPanel/EdgeFunctionRenderer.test.tsxapps/studio/components/ui/Shortcut.test.tsxapps/studio/scripts/ratchet-rules.jsonapps/studio/tests/components/SQLEditor/SQLEditor.test.tsxapps/www/app/(home)/_components/DashboardFeaturesSection.tsxapps/www/app/(home)/_components/FrameworksSectionClient.tsxapps/www/app/(products)/auth/_components/ApiSectionClient.tsxapps/www/app/(products)/auth/_components/RLSSectionClient.tsxapps/www/app/(products)/database/_components/ApiSectionClient.tsxapps/www/app/(products)/database/_components/SqlEditorSection.tsxapps/www/app/(products)/database/_components/TableEditorSection.tsxapps/www/app/(products)/database/_components/VisualDemo.tsxapps/www/app/(products)/edge-functions/_components/IntegratesSectionClient.tsxapps/www/app/(products)/realtime/_components/ApiSectionClient.tsxapps/www/app/(products)/storage/_components/ApiSectionClient.tsxapps/www/app/(products)/storage/_components/PermissionsSectionClient.tsxapps/www/app/partners/catalog/IntegrationsContent.tsxapps/www/app/partners/catalog/[slug]/PartnerCatalogDetail.tsxapps/www/app/state-of-startups/components/CohortToggle.tsxapps/www/app/state-of-startups/components/YearToggle.tsxapps/www/components/Blog/BlogViewToggle.tsxapps/www/components/Blog/DraftModeBanner.tsxapps/www/components/Button.tsxapps/www/components/Changelog/ChangelogDetailSidebar.tsxapps/www/components/Contribute/SimilarSolvedThreads.tsxapps/www/components/Contribute/UnansweredThreadsTable.tsxapps/www/components/EnterpriseFormQuotes.tsxapps/www/components/ImageFadeStack.tsxapps/www/components/LaunchWeek/11/LW11Meetups.tsxapps/www/components/LaunchWeek/15/LW15MainStage.tsxapps/www/components/LaunchWeek/15/Ticketing/LW15TicketPage.tsxapps/www/components/LaunchWeek/15/Ticketing/TicketURLCopy.tsxapps/www/components/LaunchWeek/15/lw15.components.tsxapps/www/components/LaunchWeek/7/LaunchSection/Announcement.tsxapps/www/components/LaunchWeek/7/LaunchSection/ArticleButton.tsxapps/www/components/LaunchWeek/7/LaunchSection/ProductButton.tsxapps/www/components/LaunchWeek/7/LaunchSection/ProductButtonListItem.tsxapps/www/components/LaunchWeek/X/Album/Player.tsxapps/www/components/Nav/HamburgerMenu.tsxapps/www/components/Nav/MobileMenu.tsxapps/www/components/Nav/RightClickBrandLogo.tsxapps/www/components/OpenSource/Repos.tsxapps/www/components/Pricing/ComputePricingCalculator.tsxapps/www/components/Pricing/PricingComputeSection.tsxapps/www/components/Products/Functions/FunctionsHero.tsxapps/www/components/Products/Functions/LocalDXImage.tsxapps/www/components/Sections/FunctionsUsecases.tsxapps/www/components/Sections/TimedAccordionPanels.tsxapps/www/components/Sections/TimedAccordionSection.tsxapps/www/components/Sections/TimedTabsSection.tsxapps/www/components/TabsWithHighlights.tsxapps/www/pages/changelog.tsxapps/www/pages/features.tsxapps/www/pages/support.tsxpackages/eslint-config-supabase/next.js
💤 Files with no reviewable changes (2)
- apps/studio/scripts/ratchet-rules.json
- apps/studio/.github/eslint-rule-baselines.json
There was a problem hiding this comment.
Pull request overview
This PR hardens accessibility linting across the monorepo by promoting supabase/require-explicit-tabindex from warn to error, and sweeping www, docs, design-system, plus Studio test fixtures/ratchet config to comply—primarily to improve Safari keyboard focus behavior.
Changes:
- Promote
supabase/require-explicit-tabindexto an ESLint error in the shared Next.js config. - Add explicit
tabIndexhandling across many raw<button>/role="tab"controls inwww,docs, anddesign-system. - Remove the rule from Studio’s ratchet rules and baselines; update Studio test fixtures to satisfy the stricter linting.
Reviewed changes
Copilot reviewed 90 out of 90 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/eslint-config-supabase/next.js | Promote require-explicit-tabindex to error |
| apps/www/pages/support.tsx | Add explicit tabIndex to button trigger |
| apps/www/pages/features.tsx | Add explicit tabIndex to view-mode buttons |
| apps/www/pages/changelog.tsx | Add explicit tabIndex to product-tag buttons |
| apps/www/components/TabsWithHighlights.tsx | Roving tabIndex for marketing tabs |
| apps/www/components/Sections/TimedTabsSection.tsx | Roving tabIndex for timed tabs |
| apps/www/components/Sections/TimedAccordionSection.tsx | Roving tabIndex for accordion tabs |
| apps/www/components/Sections/TimedAccordionPanels.tsx | Roving tabIndex for panel buttons + import reorder |
| apps/www/components/Sections/FunctionsUsecases.tsx | Add explicit tabIndex to example selector button |
| apps/www/components/Products/Functions/LocalDXImage.tsx | Add explicit tabIndex to copy button |
| apps/www/components/Products/Functions/FunctionsHero.tsx | Add explicit tabIndex to copy button |
| apps/www/components/Pricing/PricingComputeSection.tsx | Add explicit tabIndex to expand/collapse button |
| apps/www/components/Pricing/ComputePricingCalculator.tsx | Add explicit tabIndex to remove-item button |
| apps/www/components/OpenSource/Repos.tsx | Roving tabIndex for repo tabs |
| apps/www/components/Nav/RightClickBrandLogo.tsx | Add explicit tabIndex to menu clipboard button |
| apps/www/components/Nav/MobileMenu.tsx | Add explicit tabIndex to close button |
| apps/www/components/Nav/HamburgerMenu.tsx | Add explicit tabIndex to hamburger button |
| apps/www/components/LaunchWeek/X/Album/Player.tsx | Add explicit tabIndex to play/pause button |
| apps/www/components/LaunchWeek/7/LaunchSection/ProductButtonListItem.tsx | Add explicit tabIndex to nested button in Link |
| apps/www/components/LaunchWeek/7/LaunchSection/ProductButton.tsx | Add explicit tabIndex to button |
| apps/www/components/LaunchWeek/7/LaunchSection/ArticleButton.tsx | Add explicit tabIndex to button |
| apps/www/components/LaunchWeek/7/LaunchSection/Announcement.tsx | Add explicit tabIndex to announcement button |
| apps/www/components/LaunchWeek/15/Ticketing/TicketURLCopy.tsx | Add explicit tabIndex to copy button |
| apps/www/components/LaunchWeek/15/Ticketing/LW15TicketPage.tsx | Add explicit tabIndex to color selector buttons |
| apps/www/components/LaunchWeek/15/LW15MainStage.tsx | Add explicit tabIndex to carousel nav buttons |
| apps/www/components/LaunchWeek/15/lw15.components.tsx | Add explicit tabIndex to theme switcher buttons + import reorder |
| apps/www/components/LaunchWeek/11/LW11Meetups.tsx | Add explicit tabIndex to meetup selector button + import reorder |
| apps/www/components/ImageFadeStack.tsx | Add explicit tabIndex to nav/play controls |
| apps/www/components/EnterpriseFormQuotes.tsx | Roving tabIndex for rotating quote tabs |
| apps/www/components/Contribute/UnansweredThreadsTable.tsx | Add explicit tabIndex to several action buttons |
| apps/www/components/Contribute/SimilarSolvedThreads.tsx | Add explicit tabIndex to expand + feedback buttons |
| apps/www/components/Changelog/ChangelogDetailSidebar.tsx | Add explicit tabIndex to copy button |
| apps/www/components/Button.tsx | Add explicit tabIndex to shared Button component |
| apps/www/components/Blog/DraftModeBanner.tsx | Add explicit tabIndex to dismiss button |
| apps/www/components/Blog/BlogViewToggle.tsx | Add explicit tabIndex to view toggle buttons |
| apps/www/app/state-of-startups/components/YearToggle.tsx | Add explicit tabIndex to radio-like buttons |
| apps/www/app/state-of-startups/components/CohortToggle.tsx | Add explicit tabIndex to option buttons |
| apps/www/app/partners/catalog/IntegrationsContent.tsx | Add explicit tabIndex to view toggle buttons |
| apps/www/app/partners/catalog/[slug]/PartnerCatalogDetail.tsx | Add explicit tabIndex to listing buttons |
| apps/www/app/(products)/storage/_components/PermissionsSectionClient.tsx | Add explicit tabIndex to example tabs |
| apps/www/app/(products)/storage/_components/ApiSectionClient.tsx | Add explicit tabIndex to example tabs |
| apps/www/app/(products)/realtime/_components/ApiSectionClient.tsx | Add explicit tabIndex to example tabs |
| apps/www/app/(products)/edge-functions/_components/IntegratesSectionClient.tsx | Roving tabIndex for integrations tabs |
| apps/www/app/(products)/database/_components/VisualDemo.tsx | Add explicit tabIndex to toolbar buttons |
| apps/www/app/(products)/database/_components/TableEditorSection.tsx | Add explicit tabIndex to example tabs |
| apps/www/app/(products)/database/_components/SqlEditorSection.tsx | Add explicit tabIndex to example tabs |
| apps/www/app/(products)/database/_components/ApiSectionClient.tsx | Add explicit tabIndex to example tabs |
| apps/www/app/(products)/auth/_components/RLSSectionClient.tsx | Roving tabIndex for RLS example tabs |
| apps/www/app/(products)/auth/_components/ApiSectionClient.tsx | Roving tabIndex for API example tabs |
| apps/www/app/(home)/_components/FrameworksSectionClient.tsx | Roving tabIndex for framework tabs |
| apps/www/app/(home)/_components/DashboardFeaturesSection.tsx | Roving tabIndex for feature tabs |
| apps/studio/tests/components/SQLEditor/SQLEditor.test.tsx | Add explicit tabIndex to mocked buttons |
| apps/studio/scripts/ratchet-rules.json | Remove rule from Studio ratchet list |
| apps/studio/components/ui/Shortcut.test.tsx | Add explicit tabIndex to test buttons |
| apps/studio/components/ui/AIAssistantPanel/EdgeFunctionRenderer.test.tsx | Add explicit tabIndex to mocked buttons |
| apps/studio/components/layouts/ProjectLayout/index.test.tsx | Add explicit tabIndex to mocked ButtonTooltip button |
| apps/studio/components/interfaces/Storage/tests/EmptyBucketModal.test.tsx | Add explicit tabIndex to “Open” button |
| apps/studio/components/interfaces/Storage/tests/EditBucketModal.test.tsx | Add explicit tabIndex to “Open” button |
| apps/studio/components/interfaces/Storage/tests/DeleteBucketModal.test.tsx | Add explicit tabIndex to “Open” button |
| apps/studio/components/interfaces/Settings/General/Project.test.tsx | Add explicit tabIndex to mocked Button |
| apps/studio/components/interfaces/Platform/Webhooks/PlatformWebhooksEndpointDetails.test.tsx | Add explicit tabIndex to mocked button |
| apps/studio/components/interfaces/LocalDropdown.test.tsx | Add explicit tabIndex to mocked buttons |
| apps/studio/components/interfaces/Integrations/Integration/IntegrationOverviewTab.test.tsx | Add explicit tabIndex to actions buttons in tests |
| apps/studio/.github/eslint-rule-baselines.json | Remove rule from Studio baseline tracking |
| apps/docs/layouts/MainSkeleton.tsx | Add explicit tabIndex to mobile header button |
| apps/docs/features/ui/PromptPanel.tsx | Add explicit tabIndex to expand/copy buttons |
| apps/docs/features/ui/CodeBlock/CodeBlock.client.tsx | Add explicit tabIndex to code controls |
| apps/docs/features/docs/Troubleshooting.ui.client.tsx | Add explicit tabIndex to clear-search button |
| apps/docs/features/docs/Reference.navigation.client.tsx | Add explicit tabIndex to collapsible trigger button |
| apps/docs/features/directives/CodeSample.client.tsx | Add explicit tabIndex to “View sources” trigger |
| apps/docs/components/TerraformProviderSchema.tsx | Add explicit tabIndex to popover trigger buttons |
| apps/docs/components/Options.tsx | Add explicit tabIndex to options toggle button |
| apps/docs/components/Navigation/NavigationMenu/TopNavDropdown.tsx | Add explicit tabIndex to dropdown trigger |
| apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx | Add explicit tabIndex to dropdown button |
| apps/docs/components/Navigation/NavigationMenu/GlobalMobileMenu.tsx | Add explicit tabIndex to close button |
| apps/docs/components/GuidesSidebar.tsx | Add explicit tabIndex to copy markdown button |
| apps/docs/components/Feedback/Feedback.tsx | Add explicit tabIndex to feedback button |
| apps/docs/components/Extensions/Extensions.tsx | Add explicit tabIndex to reset button |
| apps/docs/components/AuthSmsProviderConfig/AuthSmsProviderConfig.tsx | Add explicit tabIndex to provider select buttons + import reorder |
| apps/docs/components/ApiSchemaOption.tsx | Add explicit tabIndex to collapsible trigger button + import reorder |
| apps/design-system/registry/default/example/success-check-selected.tsx | Add explicit tabIndex to pressed-state buttons |
| apps/design-system/registry/default/example/page-nav-demo.tsx | Add explicit tabIndex to nav demo buttons |
| apps/design-system/registry/default/example/page-layout-edge-function.tsx | Add explicit tabIndex to nav demo buttons |
| apps/design-system/registry/default/example/page-layout-auth-emails.tsx | Add explicit tabIndex to nav + template buttons |
| apps/design-system/registry/default/example/form-patterns-sidepanel.tsx | Add explicit tabIndex to upload/link-style buttons |
| apps/design-system/registry/default/example/form-patterns-pagelayout.tsx | Add explicit tabIndex to upload/link-style buttons |
| apps/design-system/registry/default/block/chart-bar-interactive.tsx | Add explicit tabIndex to chart toggle buttons |
| apps/design-system/components/color-palette.tsx | Add explicit tabIndex to copy buttons |
| apps/design-system/components/click-counter.tsx | Add explicit tabIndex to counter button |
| apps/design-system/registry/default/block/chart-bar-interactive.tsx | Add explicit tabIndex to chart toggle buttons |
Keep marketing tabs fully tabbable instead of incomplete roving tabIndex, render www Button as a link or button (not nested), unwrap ProductButtonListItem, and let Radix manage in-menu focus.
🎭 Playwright Test Results (next)Details
Skipped testsFeatures › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled |
joshenlim
left a comment
There was a problem hiding this comment.
Changes generally LGTM! Approving on behalf of dashboard
7389df8 to
70a21f1
Compare
…bindex-to-error-sweep
czenko
left a comment
There was a problem hiding this comment.
Thank you for doing this 🙏
Braintrust eval report
|
| const chart = key as keyof typeof chartConfig | ||
| return ( | ||
| <button | ||
| <button tabIndex={0} |
There was a problem hiding this comment.
@dnywh sorry I am late to the party, but button elements are tabbable by default, they shouldn't need this, unless something else is breaking the keyboard navigation. I suggest undoing this and actually finding the source of the issue.
What kind of change does this PR introduce?
Accessibility / lint hardening (Safari keyboard focus).
What is the current behavior?
supabase/require-explicit-tabindexis'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 explicittabIndex.DEPR-627 · follow-up to #47984 / #48040
What is the new behavior?
'supabase/require-explicit-tabindex': 'error'To test
Prefer Safari. This PR only adds explicit
tabIndexto raw<button>/role="button"call sites — not links, and not controls that already go throughButtonfromui.Marketing (
www) (staging link)/auth,/database) — section tab switchers/partners/catalog— filter / view controlsDocs (staging link)
ThemeToggle/DropdownMenuTriggerfromui(already supposed to settabIndex).Buttonfromui(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.Collapsible.Trigger)Dashboard (
studio)No production UI changes in this PR (tests + lint config only). Quick Safari smoke that prior tabindex work still holds: