a11y: Adjacent website links for navbar logo and navbar title go to the same URL
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 72/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- html, javascript
研究方向
先找出處理 logo、logo-alt 和 logo-href 的 navbar 渲染程式碼;issue 未指定檔案或測試。建立一個包含 navbar 標題和 logo 的新網站來重現問題,接著檢查渲染後的 navbar 連結。完成條件是:未設定 logo-href 時,logo 和標題共用一個連結;設定後,兩者仍各自使用不同的連結。
由索引模型根據 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
Problem
When a website has both a title and logo in the navbar and logo-href is unset, two sequential links are created to the same URL:
<div class="navbar-brand-container mx-auto">
<a href="http://localhost:6891/" class="navbar-brand navbar-brand-logo" data-original-href="http://localhost:6891/index.html">
<img src="https://quarto.org/assets/images/favicon.png" alt="link to homepage" class="navbar-logo light-content" style="">
<img src="https://quarto.org/assets/images/favicon.png" alt="link to homepage" class="navbar-logo dark-content" style="">
</a>
<a class="navbar-brand" href="http://localhost:6891/" data-original-href="http://localhost:6891/index.html" style="">
<span class="navbar-title">repro</span>
</a>
</div>
Why is this an issue
Strictly speaking I don't think the WCAG specify that this is a problem. It is instead described as a "technique"
Techniques are examples of ways to meet Web Content Accessibility Guidelines (WCAG). They are not required to meet WCAG. Content can satisfy the normative requirements of WCAG even if it does not use any of the documented techniques. See About WCAG Techniques.
Technique H2: Combining adjacent image and text links for the same resource
It is however flagged as a warning by certain accessibility checking tools such as Wave by WebAIM
Why It Matters
When adjacent links go to the same location (such as a linked product image and an adjacent linked product name that go to the same product page) this results in additional navigation and repetition for keyboard and screen reader users.
Suggestion
I think this is straightforward to fix. If logo-href is unset it should be structured into a single <a> block and if logo-href is set only then it should split into two <a> blocks.
Steps to reproduce
Steps to reproduce:
quarto createa new website- in
_quarto.ymladd undernavbar:, e.g.
logo: https://quarto.org/assets/images/favicon.png
logo-alt: "link to homepage"
Actual behavior
Sequential <a> tags with the same href:
<div class="navbar-brand-container mx-auto">
<a href="http://localhost:6891/" class="navbar-brand navbar-brand-logo" data-original-href="http://localhost:6891/index.html">
<img src="https://quarto.org/assets/images/favicon.png" alt="link to homepage" class="navbar-logo light-content" style="">
<img src="https://quarto.org/assets/images/favicon.png" alt="link to homepage" class="navbar-logo dark-content" style="">
</a>
<a class="navbar-brand" href="http://localhost:6891/" data-original-href="http://localhost:6891/index.html" style="">
<span class="navbar-title">repro</span>
</a>
</div>
Expected behavior
If logo-href is unset, both the logo and title should be contained in a single <a> block (this does affect the CSS, however)
<div class="navbar-brand-container mx-auto">
<a href="http://localhost:6891/" class="navbar-brand navbar-brand-logo" data-original-href="http://localhost:6891/index.html">
<img src="https://quarto.org/assets/images/favicon.png" alt="link to homepage" class="navbar-logo light-content" style="">
<img src="https://quarto.org/assets/images/favicon.png" alt="link to homepage" class="navbar-logo dark-content" style="">
<span class="navbar-title">repro</span>
</a>
</div>
Your environment
- Quarto 1.12.3 installed from the
.debpackage - OS: Arch Linux
- Browser: Firefox
Quarto check output
Quarto 1.12.3
[✓] Checking environment information...
Quarto cache location: /home/sera/.cache/quarto
Project: none found (single-file mode)
[✓] 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 versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.12.3
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: undefined
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /home/sera/.local/bin/chromium-browser
Source: PATH
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.6.2
Path: /usr/lib64/R
LibPaths:
- /home/sera/.R
- /usr/lib/R/library
knitr: 1.52
rmarkdown: 2.32
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.14.10
Path: /usr/bin/python3
Jupyter: 5.9.1
Kernels: ir, julia-1.13, python3, sagemath
(/) Checking Jupyter engine render....[IPKernelApp] WARNING | Kernel is running over TCP without encryption. All communication (including code and outputs) is sent in plain text and is susceptible to eavesdropping. Use IPC transport or launch with kernel manager-provisioned CurveZMQ keys to enable transport encryption.
[✓] Checking Jupyter engine render....OK
[✓] Checking Julia installation...
- 主要語言
- JavaScript
- 星號
- 6.2k
- 分支
- 496
- 平均合併
- 15 小時 47 分鐘
- 30 天內合併 PR
- 87
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
quarto-dev/quarto-cli 的其他 Issue
-
accessibility bug dark-mode dashboards
難度 1/5 1 小時以內 新手友好度 84/100
quarto-dev/quarto-cli#15447 ·
維護者通常 1 天內回覆
-
accessibility bug
難度 2/5 1-3 小時 新手友好度 78/100
quarto-dev/quarto-cli#15440 ·
維護者通常 1 天內回覆
-
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 天內回覆
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
01 type: bug 41 lvl: easy
難度 1/5 1-3 小時 新手友好度 88/100
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
-
難度 1/5 1 小時以內 新手友好度 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 due可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 79/100
維護者通常 1 天內回覆
-
bug CRIT-3
難度 1/5 1 小時以內 新手友好度 70/100
NASA-AMMOS/anms#426 ·