Skip to content

docs: add accessible routing guide#34796

Open
Ibochkarev wants to merge 5 commits into
nuxt:mainfrom
Ibochkarev:docs/accessible-routing-23375
Open

docs: add accessible routing guide#34796
Ibochkarev wants to merge 5 commits into
nuxt:mainfrom
Ibochkarev:docs/accessible-routing-23375

Conversation

@Ibochkarev
Copy link
Copy Markdown
Contributor

@Ibochkarev Ibochkarev commented Apr 11, 2026

Fixes #23375

Add a Best Practices page on titles, route announcer, NuxtLink, focus, and scroll.
Link to it from NuxtRouteAnnouncer, NuxtLink, and useRouteAnnouncer.

@Ibochkarev Ibochkarev requested a review from danielroe as a code owner April 11, 2026 05:22
@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions Bot added agentscan:mixed-signals 5.x 📚 documentation Documentation improvements or additions labels Apr 11, 2026
@coderabbitai

This comment has been minimized.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/3.guide/2.best-practices/accessibility.md`:
- Line 28: The docs incorrectly refer to an "urgency" option and only list two
values; update the text to reference the actual useRouteAnnouncer API property
name `politeness` and state its three valid values `'polite'`, `'assertive'`,
and `'off'`, and adjust the sentence that mentions custom announcements to
mention `politeness` (or custom announcement behavior) so the wording matches
the `useRouteAnnouncer` composable API.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f7807cc4-0e30-4884-96cf-28de9e1980ba

📥 Commits

Reviewing files that changed from the base of the PR and between 836defd and e9ea21c.

📒 Files selected for processing (4)
  • docs/3.guide/2.best-practices/accessibility.md
  • docs/4.api/1.components/12.nuxt-route-announcer.md
  • docs/4.api/1.components/4.nuxt-link.md
  • docs/4.api/2.composables/use-route-announcer.md

Comment thread docs/3.guide/2.best-practices/accessibility.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/3.guide/2.best-practices/accessibility.md`:
- Line 37: Edit the two sentences that mention <NuxtLink> and <RouterLink> to
insert a comma before the conjunction “so” (i.e., change “so the DOM keeps…” to
“, so the DOM keeps…”), updating the occurrences that reference <NuxtLink> and
<RouterLink> to improve grammar and readability.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 159aaf18-e069-4cfc-8724-ee05230cee95

📥 Commits

Reviewing files that changed from the base of the PR and between e9ea21c and 4d78858.

📒 Files selected for processing (1)
  • docs/3.guide/2.best-practices/accessibility.md

Comment thread docs/3.guide/2.best-practices/accessibility.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/3.guide/2.best-practices/accessibility.md (1)

13-13: Tighten WCAG reference wording for version accuracy.

Line 13 says “Understanding WCAG 2” but links to WCAG 2.1 content. Consider renaming the link text to “Understanding WCAG 2.1” for precision.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/3.guide/2.best-practices/accessibility.md` at line 13, Update the link
text "Understanding WCAG 2" to accurately reflect the target by changing it to
"Understanding WCAG 2.1" wherever it's used (the anchor text in the markdown
link), e.g., replace the string "Understanding WCAG 2" with "Understanding WCAG
2.1" so the displayed wording matches the linked WCAG 2.1 resource.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/3.guide/2.best-practices/accessibility.md`:
- Line 13: Update the link text "Understanding WCAG 2" to accurately reflect the
target by changing it to "Understanding WCAG 2.1" wherever it's used (the anchor
text in the markdown link), e.g., replace the string "Understanding WCAG 2" with
"Understanding WCAG 2.1" so the displayed wording matches the linked WCAG 2.1
resource.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: af8d5158-56d4-4eb0-8b04-61be6dacec37

📥 Commits

Reviewing files that changed from the base of the PR and between 4d78858 and 965c046.

📒 Files selected for processing (1)
  • docs/3.guide/2.best-practices/accessibility.md

Comment thread docs/3.guide/2.best-practices/accessibility.md Outdated
@Ibochkarev Ibochkarev requested a review from xjccc April 15, 2026 11:39
Comment thread docs/4.api/1.components/4.nuxt-link.md
Comment thread docs/4.api/1.components/12.nuxt-route-announcer.md
Comment thread docs/4.api/2.composables/use-route-announcer.md
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/3.guide/2.best-practices/accessibility.md`:
- Around line 32-33: The
::read-more{to="/docs/4.x/api/components/nuxt-route-announcer"}:: callout is
empty and renders no visible CTA; add a short, descriptive link label sentence
inside the read-more block (for example: "Read the Nuxt Route Announcer API" or
"Learn about the Nuxt Route Announcer") so the ::read-more:: component displays
accessible, visible link text.
- Around line 63-64: The
`::read-more{to="/docs/4.x/guide/recipes/custom-routing"}` callout is empty and
not visible; update the `::read-more` block to include visible link text (e.g.,
"Learn about custom routing" or similar) between the block markers so the
rendered docs show a clickable label for the custom routing link.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d23bc7cb-6fd6-40e7-821c-755dfa5bc442

📥 Commits

Reviewing files that changed from the base of the PR and between 965c046 and 2b38a86.

📒 Files selected for processing (4)
  • docs/3.guide/2.best-practices/accessibility.md
  • docs/4.api/1.components/12.nuxt-route-announcer.md
  • docs/4.api/1.components/4.nuxt-link.md
  • docs/4.api/2.composables/use-route-announcer.md

Comment thread docs/3.guide/2.best-practices/accessibility.md
Comment thread docs/3.guide/2.best-practices/accessibility.md
@Ibochkarev Ibochkarev requested a review from xjccc April 17, 2026 01:57
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
docs/3.guide/2.best-practices/accessibility.md (1)

60-66: Standardise spelling: "behaviour" → "behavior".

Line 65 uses "behaviour" (British spelling), but the rest of the document and the API naming use "behavior" (American spelling—see lines 38, 50, 62, and the URL fragment scroll-behavior-for-hash-links). For consistency with Nuxt's API conventions and the document's existing usage, use American spelling throughout.

Suggested consistency fix
 ::read-more{to="/docs/4.x/guide/recipes/custom-routing"}
-Read more about custom routing and scroll behaviour options.
+Read more about custom routing and scroll behavior options.
 ::
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/3.guide/2.best-practices/accessibility.md` around lines 60 - 66, Replace
the British spelling "behaviour" with American "behavior" in the Scroll section
text so it matches the API and the rest of the doc; update the sentence
referencing [`scrollBehaviorType`] and [`router.options.ts`] and the read-more
link text to use "behavior" (the URL fragment `scroll-behavior-for-hash-links`
and mentions of scrollBehaviorType/router.options.ts should remain consistent).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/3.guide/2.best-practices/accessibility.md`:
- Around line 60-66: Replace the British spelling "behaviour" with American
"behavior" in the Scroll section text so it matches the API and the rest of the
doc; update the sentence referencing [`scrollBehaviorType`] and
[`router.options.ts`] and the read-more link text to use "behavior" (the URL
fragment `scroll-behavior-for-hash-links` and mentions of
scrollBehaviorType/router.options.ts should remain consistent).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e7fa69f2-0cfa-4c2d-9670-a75b53f6c99d

📥 Commits

Reviewing files that changed from the base of the PR and between 2b38a86 and 628d018.

📒 Files selected for processing (1)
  • docs/3.guide/2.best-practices/accessibility.md

Ibochkarev and others added 5 commits April 21, 2026 10:59
Add a Best Practices page on titles, route announcer, NuxtLink, focus, and scroll. Link to it from NuxtRouteAnnouncer, NuxtLink, and useRouteAnnouncer.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- WCAG link text 2.1; cross-link to performance#links from accessibility guide
- NuxtLink: read-more to performance#links and accessibility guide
- Route announcer docs: dual read-more (accessibility + performance); politeness wording
- useRouteAnnouncer: align politeness descriptions with API
@Ibochkarev Ibochkarev force-pushed the docs/accessible-routing-23375 branch from 628d018 to 7ac4d64 Compare April 21, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x agentscan:mixed-signals 📚 documentation Documentation improvements or additions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

documentation and examples on accessible routing patterns

2 participants