Navbar item with icon and text renders an unnamed role="img" icon
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- javascript, yaml
调研方向
从 navicon.ejs 开始,然后检查它在 sidebaritem.ejs、navitem-dropdown.ejs 和 nav-footer-navitem.ejs 中的用法,了解如何区分带文本的项目和仅含图标的项目。使用提供的 _quarto.yml 和 index.qmd 重现问题,然后运行 quarto render 和所示的 axe 命令。完成标准是:带文本的图标应为装饰性图标,而仅含图标的情况应保留可访问名称。
由索引模型根据 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
A navbar item with both icon and text renders its icon as role="img" with no accessible name.
axe reports role-img-alt (WCAG 1.1.1) on every page.
The link text already names the link, so the icon is decorative.
There is no option to say so: icon takes only a string, and navicon.ejs always writes role="img".
The only attribute it passes on is the item's aria-label, which goes on the icon, not the link.
The link then reads its name twice, for example "external link Blog".
navicon.ejs is also used by sidebaritem.ejs, navitem-dropdown.ejs and nav-footer-navitem.ejs, so sidebar, menu and footer items with an icon and text behave the same way.
- #15038 covers icon-only navbar links, which is a different case.
Steps to reproduce
_quarto.yml:
project:
type: website
website:
title: "Navbar icon"
navbar:
left:
- text: "Overview"
icon: house
href: index.qmd
index.qmd:
---
title: "Home"
---
Home page.
Then:
quarto render
quarto call axe _site --viewports 1440x900
jq -r '.findings[].signature' _axe-checks/findings.json
Actual behavior
<a class="nav-link active" href="./index.html" aria-current="page"> <i class="bi bi-house" role="img"> </i> <span class="menu-text">Overview</span></a>
findings.json lists role-img-alt :: i (plus region :: #quarto-skip-link, which is unrelated).
Expected behavior
When the item has text, the icon is decorative: <i class="bi bi-house" aria-hidden="true"></i>.
role="img" with a name is only needed for icon-only items, and the item's aria-label names the link rather than the icon.
Your environment
- IDE: none, command line.
- OS: macOS 27.0.
- The same output comes from a current development build (99.9.9).
Quarto check output
Quarto 1.11.6
[✓] Checking environment information...
Quarto cache location: /Users/mcanouil/Library/Caches/quarto
Project root: /private/tmp/claude-501/-Users-mcanouil-Projects-quarto-dev-quarto-web/e598806e-b79f-4883-9554-648d53816f11/scratchpad/repro-sidebar
Project config: /private/tmp/claude-501/-Users-mcanouil-Projects-quarto-dev-quarto-web/e598806e-b79f-4883-9554-648d53816f11/scratchpad/repro-sidebar/_quarto.yml
[✓] 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.6
Path: /private/tmp/claude-501/-Users-mcanouil-Projects-quarto-dev-quarto-web/e598806e-b79f-4883-9554-648d53816f11/scratchpad/quarto-1.11.6/bin
[✓] Checking tools....................OK
TinyTeX: v2026.07
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/mcanouil/Library/TinyTeX/bin/universal-darwin
Version: 2026
[✓] Checking Chrome Headless....................OK
Using: Chrome from QUARTO_CHROMIUM
Path: /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
[✓] Checking basic markdown render....OK
ℹ R version 4.6.1 (2026-06-24)
! Config '~/.Rprofile' was loaded!
[✓] Checking R installation...........OK
Version: 4.6.1
Path: /Library/Frameworks/R.framework/Versions/4.6/Resources
LibPaths:
- /Users/mcanouil/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.13
Path: /Users/mcanouil/Projects/quarto-dev/quarto-web/.venv/bin/python3
Jupyter: 5.9.1
Kernels: julia-1.12, python3
[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.1k
- 派生
- 471
- 平均合并
- 21 小时 50 分钟
- 30 天内合并 PR
- 105
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
quarto-dev/quarto-cli 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
quarto-dev/quarto-cli#15109 ·
维护者通常 1 天内回复
-
accessibility html websites
难度 2/5 1-3 小时 新手友好度 82/100
quarto-dev/quarto-cli#15096 ·
维护者通常 1 天内回复
-
accessibility bootstrap dark-mode enhancement
难度 2/5 1-3 小时 新手友好度 62/100
quarto-dev/quarto-cli#15060 ·
维护者通常 1 天内回复
-
Code annotation gutter keeps a grey background when code blocks have none (`code-block-bg: false`)未关闭bug code-annotation code-blocks themes
难度 2/5 1-3 小时 新手友好度 76/100
quarto-dev/quarto-cli#15059 ·
维护者通常 1 天内回复
-
bug callouts code-blocks themes
难度 1/5 1-3 小时 新手友好度 82/100
quarto-dev/quarto-cli#15058 ·
维护者通常 1 天内回复
查看 quarto-dev/quarto-cli 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 83/100
awesome-dsh-plugin/awesome-dsh-plugin#8715 ·
维护者通常 1 天内回复
-
[BUG]: Document embedding fails with "Cannot have chunkOverlap >= chunkSize" after switching to an embedder with a smaller max chunk length可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
Mintplex-Labs/anything-llm#6810 ·
维护者通常 1 天内回复
-
needs-triage Technical TODO
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
AOSSIE-Org/BabyNest#268 ·
维护者通常 1 天内回复
-
bug needs-triage
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复