A navbar link with `target: _blank` is not described as opening in a new tab
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- html, javascript
- Domain
- accessibility
Research direction
Start in src/resources/formats/html/templates/quarto-html-after-body.ejs, where the issue says the external-link decoration and opensNewContext check are defined. Compare the selector used for the icon with the target check, then inspect nearby tests for HTML link decoration. Done when navbar links opening a new context receive the hidden description while the external-link icon keeps its existing exclusions.
Written by the indexing model from the issue text.
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
- Dominant language
- JavaScript
- Stars
- 6.2k
- Forks
- 496
- Avg merge
- 15h 47m
- Merged PRs (30d)
- 87
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quarto-dev/quarto-cli
-
accessibility bug dark-mode dashboards
Difficulty 1/5 Under an hour Newbie friendliness 84/100
quarto-dev/quarto-cli#15447 ·
Maintainers usually reply within 1 day
-
accessibility bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
quarto-dev/quarto-cli#15442 ·
Maintainers usually reply within 1 day
-
accessibility bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#15439 ·
Maintainers usually reply within 1 day
-
accessibility bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
quarto-dev/quarto-cli#15438 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
quarto-dev/quarto-cli#15431 · 3 comments ·
Maintainers usually reply within 1 day
All issues in quarto-dev/quarto-cli
Similar issues
-
01 type: bug 41 lvl: easy
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
521xueweihan/HelloGitHub#4655 ·
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount duePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
bug CRIT-3
Difficulty 1/5 Under an hour Newbie friendliness 70/100
NASA-AMMOS/anms#426 ·