A navbar link with `target: _blank` is not described as opening in a new tab
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- html, javascript
調査の方向性
src/resources/formats/html/templates/quarto-html-after-body.ejsから始めます。issueによると、ここで外部リンクの装飾とopensNewContextのチェックが定義されています。アイコンに使われているセレクターとターゲットのチェックを比較し、その後、HTMLリンクの装飾に関する近くのテストを確認します。新しいコンテキストを開くナビゲーションバーのリンクに非表示の説明が付与され、外部リンクアイコンは既存の除外条件を維持していれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- JavaScript
- スター
- 6.2k
- フォーク
- 492
- 平均マージ
- 13時間 51分
- マージ済み PR(30日)
- 82
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/quarto-cli のほかの issue
-
accessibility bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto-cli#15439 ·
メンテナーはふだん 1 日以内に返信
-
accessibility bug
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
quarto-dev/quarto-cli#15438 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto-cli#15431 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bootstrap enhancement themes
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
quarto-dev/quarto-cli#15421 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
quarto-dev/quarto-cli#15408 ·
メンテナーはふだん 1 日以内に返信
quarto-dev/quarto-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
crxjs/chrome-extension-tools#1261 ·
-
support
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
01 type: bug
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
conorbronsdon/avoid-ai-writing#559 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
agentregistry-dev/website#69 ·