Navbar item with icon and text renders an unnamed role="img" icon
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, yaml
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Bắt đầu với navicon.ejs, sau đó kiểm tra cách nó được dùng trong sidebaritem.ejs, navitem-dropdown.ejs và nav-footer-navitem.ejs để hiểu cách phân biệt các mục có văn bản với các mục chỉ có biểu tượng. Tái hiện bằng _quarto.yml và index.qmd được cung cấp, rồi chạy quarto render và lệnh axe được nêu. Hoàn tất khi các biểu tượng đi kèm văn bản mang tính trang trí và trường hợp chỉ có biểu tượng vẫn giữ được tên có thể truy cập.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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...
- Ngôn ngữ chính
- JavaScript
- Star
- 6.1k
- Fork
- 471
- Merge trung bình
- 22 giờ 56 phút
- Pull request đã merge (30 ngày)
- 98
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quarto-dev/quarto-cli
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
quarto-dev/quarto-cli#15109 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility html websites
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
quarto-dev/quarto-cli#15096 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility bootstrap dark-mode enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
quarto-dev/quarto-cli#15060 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Code annotation gutter keeps a grey background when code blocks have none (`code-block-bg: false`)Đang mởbug code-annotation code-blocks themes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
quarto-dev/quarto-cli#15059 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug callouts code-blocks themes
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 82/100
quarto-dev/quarto-cli#15058 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/quarto-cli
Issue tương tự
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Riloox/hostkind-open#45 ·
-
Request: semgrepĐang mởnew icon permissions in review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
simple-icons/simple-icons#15093 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 83/100
module-federation/core#5205 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
遥测历史查询始终返回 HTTP 400,页面静默无结果Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
aikido security:critical
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
dequelabs/monitor-utility#63 ·