A dashboard `logo` without `logo-alt` gives an unlabelled link and a `Q-10-2` warning about template variables
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start in crates/quarto-core/src/dashboard/navbar.rs where logo variants receive alt, then trace the template access in crates/quarto-core/src/template.rs and the dashboard title or brand metadata available there. Reproduce with the supplied dashboard and compare q2’s output with Quarto 1. Done when the logo link has an accessible name where possible and missing names produce one actionable warning instead of two undefined-variable warnings.
索引モデルが issue の本文から書いたものです。
説明
Bug description
The dashboard from #1131 sets a logo and no logo-alt, and each q2 render ends with two template warnings about it.
The warnings point at a real problem, but they do not say what it is.
Without logo-alt, both q2 and Quarto 1 write the logo as the only content of a link, with alt="".
An empty alt marks the image as decorative, so the link has no accessible name, and a screen reader announces it as an unlabelled link.
q2 notices that alt is missing, but reports it as a template detail.
The navbar code adds an alt key to each logo variant only when logo-alt is set:
The template then reads that key for both images, and the missing key becomes an undefined-variable warning:
Steps to reproduce
Put any logo.svg next to index.qmd:
---
title: Hello
format:
dashboard:
logo: logo.svg
---
## Row
Hello.
q2 render index.qmd
quarto render index.qmd
grep -o '<a href="#"><img[^>]*navbar-logo[^>]*></a>' index.html
Actual behavior
q2 prints:
Warning [Q-10-2]: Undefined variable: rendered.dashboard.logo.light.alt
Warning [Q-10-2]: Undefined variable: rendered.dashboard.logo.dark.alt
2 warnings
Quarto 1 prints nothing.
Both write the same links, with no accessible name:
<a href="#"><img src="logo.svg" alt="" class="navbar-logo light-content d-inline-block"></a>
<a href="#"><img src="logo.svg" alt="" class="navbar-logo dark-content d-inline-block"></a>
Expected behavior
The logo link has an accessible name even without logo-alt, for example from the document title or from the brand's meta.name.
When no name can be found, a single warning tells the author to set logo-alt, in place of two warnings about rendered.dashboard.logo.*.alt.
Your environment
- q2:
q2 (quarto 2) 0.43.0-nightly.20261109(nightly built from 8f17e95), andq2 v0.42.0. - Quarto 1 for comparison: development build of quarto-dev/quarto-cli@fa74261.
- OS: macOS 27.2 (arm64).
- Terminal, no IDE.
- 主要言語
- Rust
- スター
- 302
- フォーク
- 22
- 平均マージ
- 5時間 8分
- マージ済み PR(30日)
- 220
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/q2 のほかの issue
-
`q2 render` ignores `NO_COLOR` and prints colour codes and hyperlinks in its diagnostics対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
quarto-dev/q2#1135 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
quarto-dev/q2#1133 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quarto-dev/q2#1103 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
quarto-dev/q2#1095 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
quarto-dev/q2#1031 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
design-data-spec
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
adobe/spectrum-design-data#1744 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
defect
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信