Navbar `logo-alt` is ignored when `logo` uses the `light`/`dark` form
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ệ
- typescript, yaml
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Đọc src/project/types/website/website-shared.ts, nơi logo-alt được xử lý trước resolveLogo(), sau đó kiểm tra src/resources/projects/website/templates/navbrand.ejs và các bài kiểm tra liên quan đến việc hiển thị logo sáng/tối. Tái hiện bằng cấu hình YAML trong issue và kiểm tra các phần tử navbar <img> được tạo ra. Hoàn tất khi cả hai biến thể đều dùng logo-alt nếu không có văn bản thay thế riêng, đồng thời giữ nguyên văn bản thay thế được chỉ định rõ cho từng biến thể.
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
website.navbar.logo-alt only takes effect when logo is a plain string.
With logo: {light, dark}, the value is dropped silently and both <img> elements render with alt="".
The navbar logo link then has no accessible name.
website-shared.ts wraps the string into { path, alt } before calling resolveLogo(), and does nothing for the object form.
The sidebar has the same shape for sidebar.logo-alt.
navbrand.ejs reads alt from each variant and falls back to an empty string.
Neither the schema nor the documentation says that logo-alt only applies to the string form.
This is different from #14660, which is about the default when no alt text is given at all.
Steps to reproduce
---
title: "Logo alt test"
---
Content.
_quarto.yml:
project:
type: website
website:
navbar:
logo:
light: light.svg
dark: dark.svg
logo-alt: "Site name"
quarto render
grep -o '<img[^>]*navbar-logo[^>]*>' _site/index.html
Actual behavior
<img src="./light.svg" alt="" class="navbar-logo light-content">
<img src="./dark.svg" alt="" class="navbar-logo dark-content">
With logo: light.svg and the same logo-alt, the output is alt="Site name".
With logo: {light: {path: light.svg, alt: "Light alt"}, dark: {path: dark.svg, alt: "Dark alt"}}, each variant gets its own alt.
Expected behavior
logo-alt is applied to both variants when they have no alt of their own.
If that is not wanted, rendering should warn that logo-alt is ignored for the light/dark form, and the schema description should say so.
Your environment
- IDE: none, terminal only
- OS: macOS (Darwin 27.0.0, Apple Silicon)
Quarto check output
Quarto 99.9.9
[✓] 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 Quarto installation......OK
Version: 99.9.9
commit: 69592e5c1718d3e1b2f3d11e757d32e23a16af67
- Ngôn ngữ chính
- JavaScript
- Star
- 6.1k
- Fork
- 478
- Merge trung bình
- 17 giờ 53 phút
- Pull request đã merge (30 ngày)
- 135
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
-
accessibility bug embed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
quarto-dev/quarto-cli#15306 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bootstrap bug themes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
quarto-dev/quarto-cli#15304 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility bug code-blocks html themes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/quarto-cli#15303 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility brand bug dark-mode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
quarto-dev/quarto-cli#15301 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bootstrap bug html tables
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
quarto-dev/quarto-cli#15300 · 1 bình luận ·
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ự
-
Build produces empty forge.min.js: package.json lists "forge" instead of "node-forge"Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Fei2411/DeepSeek-Bot#963 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Miaotofu01/Study-Mate#244 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test-reliability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Azure/azure-sdk-for-js#40672 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
txn2/mcp-data-platform#2492 ·
Maintainer thường phản hồi trong vòng 1 ngày