Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Default listing renders an empty, focusable thumbnail link for posts without an image

未关闭 适合新手
#15,066 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃

调研方向

从 item-default.ejs.md 模板开始,其中缩略图始终包裹在 a 标签中;同时查看 website-listing-read.ts 中的 emptyDiv(),它负责填充空的情况。复现方法:渲染一个默认列表,其中包含一篇没有图片的文章,然后检查输出中是否存在没有名称的链接。完成的标准是:没有图片的文章不再有可聚焦的缩略图链接,或者只保留一个 aria-hidden 且 tabindex 设为 -1 的链接,并且 axe 不再对其报告 link-name。

由索引模型根据 Issue 内容生成。

描述

accessibility bug listings
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

In a default listing, a post with no preview image gets an empty thumbnail link.

item-default.ejs.md always wraps the thumbnail in <a href="...">.
When the post has no image and the listing sets no image-placeholder, emptyDiv() in website-listing-read.ts fills it with <div class="listing-item-img-placeholder">&nbsp;</div>.
The link has no accessible name, but it is still a Tab stop, so keyboard and screen reader users meet one unnamed link per post before its title link.
axe reports it as link-name (WCAG 2.4.4, 4.1.2).

The grid listing is not affected, as its whole card is one link with text.

This differs from #15038, where the thumbnail has an image without alt text, and from #7028, which asks for alt text on image-placeholder.

Steps to reproduce

_quarto.yml:

project:
  type: website
website:
  title: "Listing"

index.qmd:

---
title: "Posts"
listing:
  contents: posts
  type: default
---

posts/one/index.qmd:

---
title: "Post one"
date: 2026-01-01
---

Text without an image.

Render the website and inspect _site/index.html, or run axe on it.

Actual behavior
<div class="thumbnail"><a href="./posts/one/index.html" class="no-external">

<div class="listing-item-img-placeholder card-img-top" >&nbsp;</div>

</a></div>

axe: link-name on the thumbnail link of each post; the link is reachable with Tab and announced with no name.

Expected behavior

A post with no image gets no thumbnail link, or a link hidden from assistive technology and taken out of the tab order (aria-hidden="true" and tabindex="-1"), since the title link next to it already goes to the same page.

Your environment
  • IDE: none, rendered from the command line.
  • OS: macOS 27.0.
Quarto check output
quarto check
Quarto 99.9.9

[✓] Checking environment information...
      Quarto cache location: /Users/mcanouil/Library/Caches/quarto
      Project: none found (single-file mode)

[✓] 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: 99.9.9
      commit: b86f98d382940bef6c65f37ea0bdfba844f19b6d
      Path: /Users/mcanouil/Projects/quarto-dev/quarto-cli/package/dist/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.13.11
      Path: /Users/mcanouil/Projects/q2-tests/.venv/bin/python3
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with python3 -m pip install jupyter

[✓] Checking Julia installation...
主要语言
JavaScript
星标
6.1k
派生
466
平均合并
20 小时 6 分钟
30 天内合并 PR
84

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

quarto-dev/quarto-cli 的其他 Issue

查看 quarto-dev/quarto-cli 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。