mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 15:39:13 +00:00
## Problem The daily Docs Accessibility Scan fails on 5 guides with blocking violations, tracked in [DOCS-1817](https://linear.app/supabase/issue/DOCS-1817/fix-the-accessibility-issues-the-daily-docs-scan-finds-on-5-guides). This PR fixes 4 of them. - Deep linking, Expo social sign-in, and push notifications repeat the same heading text in several tabs, so two or more headings get the same `id`. Deep linking also includes the "Universal links" partial twice. Screen readers and in-page links can land on the wrong heading. - On Resources, the "Migrate to Supabase" heading is an `h3` with no `h2` above it. The [run on 2026-12-02](https://github.com/supabase/supabase/actions/runs/46817154464) also failed on 8 pages that returned 404. Those pages had merged to `master` during a code freeze, so production didn't serve them yet. They return 200 now, and [DOCS-1839](https://linear.app/supabase/issue/DOCS-1839/scan-only-the-pages-production-serves-in-the-daily-docs-accessibility) tracks keeping the scan from failing that way. ## Solution - **Repeated headings in content:** The first copy of each heading keeps its anchor. Each later copy gets a custom anchor named after its tab, such as `#deep-link-config-swift`. The partial takes an anchor suffix through `variables`, so each include gets its own anchor. No page in the repo links to the changed anchors, and the visible heading text stays the same. - **Resources:** The "Migrate to Supabase" and "Postgres resources" headings are now `h2`. Their anchors stay the same, so the blog posts that link to `#migrate-to-supabase` keep working. The headings render at `h2` size. Advisors also has duplicate heading `id` values. #53313 fixes them by giving IDs only to the open tab, which keeps links to each lint's headings working. This PR leaves Advisors to #53313. ## Preview links | Guide | Live | Preview | Check | | -- | -- | -- | -- | | Deep linking | [/docs/guides/auth/native-mobile-deep-linking](https://supabase.com/docs/guides/auth/native-mobile-deep-linking) | [Swift tab, Deep link config](https://docs-git-alexisa-docs-1817-supabase.vercel.app/docs/guides/auth/native-mobile-deep-linking?queryGroups=platform&platform=swift#deep-link-config-swift) | `#deep-link-config`, `#universal-links` | | Expo social sign-in | [/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in](https://supabase.com/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in) | [Expo tab, Prerequisites](https://docs-git-alexisa-docs-1817-supabase.vercel.app/docs/guides/auth/quickstarts/with-expo-react-native-social-sign-in?queryGroups=apple-authentication&apple-authentication=expo-apple-authentication#prerequisites-expo) | `#prerequisites`, `#ios` | | Push notifications | [/docs/guides/functions/examples/push-notifications](https://supabase.com/docs/guides/functions/examples/push-notifications) | [FCM tab, Supabase setup](https://docs-git-alexisa-docs-1817-supabase.vercel.app/docs/guides/functions/examples/push-notifications?queryGroups=platform&platform=fcm#supabase-setup-fcm) | `#supabase-setup`, `#send-push-notification` | | Resources | [/docs/guides/resources](https://supabase.com/docs/guides/resources) | [Migrate to Supabase](https://docs-git-alexisa-docs-1817-supabase.vercel.app/docs/guides/resources#migrate-to-supabase) | "Migrate to Supabase" and "Postgres resources" are `h2` | ## Verification - The `@a11y` spec passes for the 4 fixed guides on the preview deployment and against a local docs server, run through `pnpm e2e:docs:a11y`. - The rendered HTML for each guide has no duplicate `id` values. - `pnpm check:removed-anchors --base origin/master` reports no removed linked anchors. - The markdown export (`pnpm build:guides-markdown`) shows the original heading text without the custom anchors. - Docs typecheck, ESLint, and oxfmt pass on the changed files. ## Review category (docs PRs only) - [ ] Critical: needs a review as soon as possible - [ ] Urgent: the feature ships soon, or it's blocking something else - [x] Moderate: good to have soon, not urgent - [ ] Low: get to it when you can ## Review instructions 1. Open each preview link in the table above. Each one opens the right tab at a heading that changed. 2. In the browser console, run `document.querySelectorAll('[id="<anchor>"]').length` for each anchor in the **Check** column. Each returns `1`. 3. On the Resources preview, check that "Migrate to Supabase" and "Postgres resources" are `h2` headings. ## Checklist - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) Part of [DOCS-1817](https://linear.app/supabase/issue/DOCS-1817/fix-the-accessibility-issues-the-daily-docs-scan-finds-on-5-guides).
151 lines
4.9 KiB
TypeScript
151 lines
4.9 KiB
TypeScript
import type { ContentListingGroup } from '~/lib/content-listings.schema'
|
|
|
|
export const resourcesOverview: ContentListingGroup = {
|
|
id: 'resources-overview',
|
|
type: 'grid',
|
|
items: [
|
|
{
|
|
title: 'Examples',
|
|
href: '/guides/getting-started',
|
|
description: 'Official GitHub examples, curated content from the community, and more.',
|
|
},
|
|
{
|
|
title: 'Glossary',
|
|
href: '/guides/resources/glossary',
|
|
description: 'Definitions for terminology and acronyms used in the Supabase documentation.',
|
|
},
|
|
],
|
|
}
|
|
|
|
export const resourcesMigrate: ContentListingGroup = {
|
|
id: 'resources-migrate',
|
|
heading: 'Migrate to Supabase',
|
|
headingLevel: 'h2',
|
|
type: 'grid',
|
|
items: [
|
|
{
|
|
title: 'Auth0',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-auth0',
|
|
icon: '/docs/img/icons/auth0-icon',
|
|
hasLightIcon: true,
|
|
description: 'Move your auth users from Auth0 to a Supabase project.',
|
|
},
|
|
{
|
|
title: 'Firebase Auth',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-firebase-auth',
|
|
icon: '/docs/img/icons/firebase-icon',
|
|
hasLightIcon: false,
|
|
description: 'Move your auth users from a Firebase project to a Supabase project.',
|
|
},
|
|
{
|
|
title: 'Firestore Data',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-firestore-data',
|
|
icon: '/docs/img/icons/firebase-icon',
|
|
hasLightIcon: false,
|
|
description: 'Migrate the contents of a Firestore collection to a single Postgres table.',
|
|
},
|
|
{
|
|
title: 'Firebase Storage',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-firebase-storage',
|
|
icon: '/docs/img/icons/firebase-icon',
|
|
hasLightIcon: false,
|
|
description: 'Convert your Firebase Storage files to Supabase Storage.',
|
|
},
|
|
{
|
|
title: 'Heroku',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-heroku',
|
|
icon: '/docs/img/icons/heroku-icon',
|
|
hasLightIcon: false,
|
|
description: 'Migrate your Heroku Postgres database to Supabase.',
|
|
},
|
|
{
|
|
title: 'Render',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-render',
|
|
icon: '/docs/img/icons/render-icon',
|
|
hasLightIcon: false,
|
|
description: 'Migrate your Render Postgres database to Supabase.',
|
|
},
|
|
{
|
|
title: 'Amazon RDS',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-amazon-rds',
|
|
icon: '/docs/img/icons/aws-rds-icon',
|
|
hasLightIcon: false,
|
|
description: 'Migrate your Amazon RDS database to Supabase.',
|
|
},
|
|
{
|
|
title: 'Postgres',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-postgres',
|
|
icon: '/docs/img/icons/postgres-icon',
|
|
hasLightIcon: false,
|
|
description: 'Migrate your Postgres database to Supabase.',
|
|
},
|
|
{
|
|
title: 'MySQL',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-mysql',
|
|
icon: '/docs/img/icons/mysql-icon',
|
|
hasLightIcon: false,
|
|
description: 'Migrate your MySQL database to Supabase.',
|
|
},
|
|
{
|
|
title: 'Microsoft SQL Server',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-mssql',
|
|
icon: '/docs/img/icons/mssql-icon',
|
|
hasLightIcon: false,
|
|
description: 'Migrate your Microsoft SQL Server database to Supabase.',
|
|
},
|
|
{
|
|
title: 'Neon',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-neon',
|
|
icon: '/docs/img/icons/neon-icon',
|
|
hasLightIcon: true,
|
|
description: 'Migrate your Neon database to Supabase.',
|
|
},
|
|
{
|
|
title: 'Vercel Postgres',
|
|
href: 'https://supabase.com/kb/guides/migrate-from-vercel-postgres',
|
|
icon: '/docs/img/icons/vercel-icon',
|
|
hasLightIcon: true,
|
|
description: 'Migrate your Vercel Postgres database to Supabase.',
|
|
},
|
|
{
|
|
title: 'InstantDB',
|
|
href: 'https://supabase.com/migrate/instantdb',
|
|
description: 'Migrate your InstantDB app to Supabase.',
|
|
},
|
|
],
|
|
}
|
|
|
|
export const resourcesPostgres: ContentListingGroup = {
|
|
id: 'resources-postgres',
|
|
heading: 'Postgres resources',
|
|
headingLevel: 'h2',
|
|
type: 'grid',
|
|
items: [
|
|
{
|
|
title: 'Managing Indexes',
|
|
href: '/guides/database/postgres/indexes',
|
|
description: 'Improve query performance using various index types in Postgres.',
|
|
},
|
|
{
|
|
title: 'Cascade Deletes',
|
|
href: '/guides/database/postgres/cascade-deletes',
|
|
description: 'Understand the types of foreign key constraint deletes.',
|
|
},
|
|
{
|
|
title: 'Drop all tables in schema',
|
|
href: '/guides/database/postgres/dropping-all-tables-in-schema',
|
|
description: 'Delete all tables in a given schema.',
|
|
},
|
|
{
|
|
title: 'Select first row per group',
|
|
href: '/guides/database/postgres/first-row-in-group',
|
|
description: 'Retrieve the first row in each distinct group.',
|
|
},
|
|
{
|
|
title: 'Print Postgres version',
|
|
href: '/guides/database/postgres/which-version-of-postgres',
|
|
description: 'Find out which version of Postgres you are running.',
|
|
},
|
|
],
|
|
}
|