Skip link href is rewritten to a cross-document URL on index.html
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- accessibility, frontend
Direzione di ricerca
Inizia in src/resources/projects/website/navigation/quarto-nav.js, nella logica di riscrittura dei link intorno alle righe 271-282, quindi riproduci il problema con l’esempio minimo di QMD e _quarto.yml. Esegui quarto render seguito da quarto call axe _site e verifica che lo skip link in /index.html rimanga un frammento dello stesso documento e che la home page non segnali più la violazione della regione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
On a website's index.html, quarto-nav.js rewrites the skip-to-content link so its href points at a different document than the page it is on. The link is emitted as a same-document fragment:
<a id="quarto-skip-link" class="visually-hidden-focusable" href="#quarto-document-content">
At load time, quarto-nav.js walks every <a> and strips a trailing /index.html from its resolved href:
For the skip link, links[i].href reads back as the fully resolved URL, so on http://host/index.html it is http://host/index.html#quarto-document-content. The regex matches /index.html followed by #, and the href becomes http://host/#quarto-document-content — a URL whose path no longer matches the document's.
Two consequences:
- The link is no longer a same-document fragment, so activating it navigates to
/and reloads instead of moving focus within the current page. That defeats the purpose of a skip link for keyboard users, which is what #14684 added it for. axe-core'sregionrule exempts skip links from "all page content should be contained by landmarks" only when the href is a same-document fragment. With the rewritten href the exemption is lost, so every scan of a Quarto site reports aregionviolation on#quarto-skip-link, on the home page only.
The rewrite is intentional for ordinary navigation links (#14667 refined the regex). It should not apply to links that were authored as bare fragments.
Steps to reproduce
---
title: "Trail Notes"
---
Notes from walking the coast path.
With a minimal _quarto.yml:
project:
type: website
website:
title: "Trail Notes"
navbar:
left:
- href: index.qmd
text: Home
Then:
quarto render
quarto call axe _site
Or, without the scanner: serve _site over HTTP, open /index.html, and read document.getElementById("quarto-skip-link").href in the console.
Actual behavior
On /index.html, the skip link's href resolves to a different document:
href = http://127.0.0.1:5503/#quarto-document-content
data-original-href = http://127.0.0.1:5503/index.html#quarto-document-content
quarto call axe _site reports the region violation on the home page and not on any other page:
index.html 1440x900 light 3 color-contrast,image-alt,region
index.html 1440x900 dark 2 image-alt,region
gear.html 1440x900 light 0 (none)
ID IMPACT STANDARD N PAGES STATUS
region-5ae782 moderate Best Practice 1 1 new
**Standard:** Best Practice · **Impact:** moderate · **Signature:** `region :: #quarto-skip-link`
**Problem:** Some page content is not contained by landmarks
Pages other than index.html are unaffected: their rewrite is a no-op, the href stays same-document, and region does not fire. The two pages have identical landmark structure.
Expected behavior
The skip link keeps a same-document href on every page, including index.html. Activating it moves focus to the main content without a navigation, and axe-core's region rule continues to exempt it.
Skipping the rewrite for links authored as bare fragments would fix it. The pre-resolution attribute value is available as links[i].getAttribute("href"), so a link whose attribute starts with # can be left alone.
Your environment
- IDE: Positron 1.130.0
- OS: macOS 26.6.2 (build 25G83)
Quarto check output
Quarto 1.11.4
[✓] Checking environment information...
Quarto cache location: /Users/charlottewickham/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.101.0: OK
Deno version 2.7.14: OK
Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.11.4
Path: /Applications/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2026.04
Chrome Headless Shell: 150.0.7871.115
VeraPDF: 1.28.2
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/charlottewickham/Library/TinyTeX/bin/universal-darwin
Version: 2026
[✓] Checking Chrome Headless....................OK
Using: Chrome Headless Shell installed by Quarto
Path: /Users/charlottewickham/Library/Application Support/quarto/chrome-headless-shell/chrome-headless-shell-mac-arm64/chrome-headless-shell
Version: 150.0.7871.115
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.6.0
Path: /Library/Frameworks/R.framework/Versions/4.6/Resources
LibPaths:
- /Users/charlottewickham/Library/R/arm64/4.6/library
- /Library/Frameworks/R.framework/Versions/4.6/Resources/library
knitr: 1.51
rmarkdown: 2.31
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.12.2
Path: /Users/charlottewickham/.pyenv/versions/3.12.2/bin/python3
Jupyter: 5.9.1
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking Julia installation...
AI-assisted investigation
- AI tool used: Claude Code
- Codebase grounding: local clone
- Human review: I have reviewed, tested, and verified the AI-generated content before submitting.
- Lingua principale
- JavaScript
- Stelle
- 6k
- Fork
- 461
- Merge medio
- 12h 42m
- PR unite (30g)
- 54
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di quarto-dev/quarto-cli
-
accessibility bug embed websites
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/quarto-cli#14972 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility documentation revealjs
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
quarto-dev/quarto-cli#14971 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility revealjs
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
quarto-dev/quarto-cli#14970 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility embed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
quarto-dev/quarto-cli#14968 ·
I maintainer di solito rispondono entro 1 giorno
-
accessibility revealjs themes
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
quarto-dev/quarto-cli#14963 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quarto-dev/quarto-cli
Issue simili
-
NoCode.vue, Task.vue: replace explicit `any` with real typesForse già presa @prayas-bit l’ha presa oggi. Apertaarea/frontend good first issue kind/cooldown
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
kestra-io/kestra#20347 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Electron/Chromium StatusNotifierItem unreachable via unique bus name, tray icon never appearsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
ubuntu/gnome-shell-extension-appindicator#676 · 1 commento ·
-
first-Agent inherits Docker TLS settings for its recorded Unix socketForse già presa @ericcaiwx-star l’ha presa oggi. Apertaclawsweeper:bulk-filed clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
openclaw/openclaw-enterprise#1337 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue quality
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 86/100
StudentSuite/awesome-student-resources#554 ·
I maintainer di solito rispondono entro 1 giorno