A navbar link with `target: _blank` is not described as opening in a new tab
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 78/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- html, javascript
- Domaine
- accessibility
Piste de recherche
Commencez dans src/resources/formats/html/templates/quarto-html-after-body.ejs, où, selon l’issue, sont définies la décoration des liens externes et la vérification opensNewContext. Comparez le sélecteur utilisé pour l’icône à la vérification de la cible, puis examinez les tests voisins sur la décoration des liens HTML. Le travail est terminé lorsque les liens de la barre de navigation qui ouvrent un nouveau contexte reçoivent la description masquée et que l’icône de lien externe conserve ses exclusions actuelles.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
This is a follow-up to #9469, which describes a link that link-external-newwindow opens in a new tab to assistive technology.
It adds aria-describedby="quarto-ext-newwindow-label", which points to a hidden "(opens in a new tab)" note.
That decoration reuses the selector of the external link icon, which excludes .nav-link, .navbar-brand, and .quarto-navigation-tool, so it never reaches the navbar:
The icon exclusion makes sense, since a navbar link should not get the external link icon.
The description is a different matter: a navbar item with target: _blank opens a new tab and gives no sign of it to assistive technology.
This is the case that WCAG 3.2.5 Change on Request (Level AAA) covers, when the link text does not say it.
An icon-only navbar link has the same problem.
The description could be added to any link, navbar included, whose target is not _self, _parent, or _top, the same test as opensNewContext in that file, while the icon keeps its current selector.
Related: #5985.
Steps to reproduce
_quarto.yml:
project:
type: website
website:
title: New tab
navbar:
left:
- href: index.qmd
text: Home
- href: https://quarto.org
text: Quarto
target: _blank
right:
- icon: github
href: https://github.com/quarto-dev/quarto-cli
aria-label: Quarto on GitHub
target: _blank
format:
html:
link-external-newwindow: true
index.qmd:
---
title: Home
---
Home page. [External](https://quarto.org)
Serve the _site folder over HTTP (the decoration treats file:// pages differently), and read the links:
[...document.querySelectorAll(".navbar a.nav-link")].map((a) => [a.textContent.trim(), a.target, a.getAttribute("aria-describedby")]);
document.querySelector("main a[href^=https]").getAttribute("aria-describedby");
Actual behavior
[["Home", "", null], ["Quarto", "_blank", null], ["", "_blank", null]]
"quarto-ext-newwindow-label"
The body link has the description. The two navbar links that open a new tab have none.
Expected behavior
Both navbar links with target="_blank" have aria-describedby="quarto-ext-newwindow-label", like the body link.
Your environment
- Quarto: 99.9.9 (development build, commit 83432c0).
- Browser: Chromium (Playwright).
- OS: macOS 27.2.1.
Quarto check output
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.13.0: OK
Dart Sass version 1.107.1: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 83432c028f6c07167c23f948da7067b37fe8a18b
- Langage dominant
- JavaScript
- Étoiles
- 6.2k
- Forks
- 492
- Merge moyen
- 13 h 51 min
- PR mergées (30 j)
- 82
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de quarto-dev/quarto-cli
-
accessibility bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
quarto-dev/quarto-cli#15439 ·
Les mainteneurs répondent en général sous 1 jour
-
accessibility bug
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
quarto-dev/quarto-cli#15438 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
quarto-dev/quarto-cli#15431 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bootstrap enhancement themes
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
quarto-dev/quarto-cli#15421 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
quarto-dev/quarto-cli#15408 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de quarto-dev/quarto-cli
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
crxjs/chrome-extension-tools#1261 ·
-
support
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
01 type: bug
Difficulté 1/5 Moins d'une heure Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
conorbronsdon/avoid-ai-writing#559 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 75/100
agentregistry-dev/website#69 ·