a11y: appendix "cite as" entry has `role="listitem"` with no `role="list"` parent

Đang mở Phù hợp với người mới
#15,171 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Lĩnh vực
accessibility

Hướng nghiên cứu

Issue đề cập đến src/format/html/format-html-appendix.ts, đặc biệt là extractCiteEl quanh các dòng 322–326 và mã appendix quanh các dòng 542–559. Hãy đọc cách phần tử cite được trích xuất và thêm vào, sau đó kết xuất ví dụ QMD được cung cấp với citation: true và kiểm tra markup appendix thu được. Hoàn thành khi mục cite không còn gây ra vi phạm aria-required-parent của axe-core; issue cho phép xóa role="listitem" hoặc thêm phần tử cha có role="list".

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

With citation: true, the "For attribution, please cite this work as" entry in the appendix is a div with role="listitem" and no role="list" ancestor.
axe-core reports this as aria-required-parent (critical, WCAG 2.0 A, SC 1.3.1 Info and Relationships).

Pandoc's citeproc wraps each csl-entry (role="listitem") in a role="list" container.
extractCiteEl takes the .csl-entry out of that container and returns it alone, and the appendix code appends it to the citation section.

#14755 reports the same defect for margin citations.
That issue is about a different code path, so a fix for the margin case does not cover the appendix.

Steps to reproduce
---
title: "Cite as test"
author: Jane Doe
date: 2026-01-01
citation: true
format: html
---

Content.
quarto render index.qmd
grep -o '<div[^>]*quarto-appendix-citeas[^>]*>' index.html
Actual behavior
<div id="ref-doe2026" class="csl-entry quarto-appendix-citeas" role="listitem">

There is no element with role="list" in the page.
Running the axe.min.js that ships with Quarto against the rendered page gives one aria-required-parent violation, on this element.

Expected behavior

The entry is not marked as a list item when it has no list parent, or it is placed inside an element with role="list".

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ờ 26 phút
Pull request đã merge (30 ngày)
126

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/quarto-cli

Tất cả issue của quarto-dev/quarto-cli

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.