Skip to content

axe: output: document report omits WCAG conformance level #14604

@cwickham

Description

@cwickham

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

When axe accessibility checking is rendered with output: document, the on-page
report tells you each violation's impact (Minor / Moderate / Serious / Critical),
description, help text, and the offending CSS selectors — but it never tells you
which conformance category the violation belongs to.

axe-core classifies every rule via its tags array, which encodes both:

  • the category (cat.aria, cat.color, cat.keyboard, cat.semantics, …), and
  • the conformance levelbest-practice (axe's own recommendation, not tied to
    any WCAG success criterion) vs. wcag2a / wcag2aa / wcag21a / wcag21aa /
    wcag22aa and the specific criterion (wcag111, wcag143, …).

This distinction matters a lot for triage: a best-practice finding is not a WCAG
conformance failure, but is rendered identically to a genuine
WCAG 2.0 Level A failure.

The information is already present in the axe result (and is
fully exposed by output: json) — it just isn't surfaced in output: document.
The tags are easy to parse by prefix, so the category and conformance level can be
derived directly from violation.tags without any extra data source:

// "Best Practice" if best-practice, otherwise the WCAG level(s)/criteria
const level = violation.tags.includes("best-practice")
  ? "Best Practice"
  : violation.tags.filter(t => t.startsWith("wcag")).join(", ");
// e.g. "aria", "semantics", "text-alternatives"
const category = violation.tags.find(t => t.startsWith("cat."))?.slice(4);

Investigation was AI-assisted and grounded in a local clone of quarto-cli
(per CONTRIBUTING.md, "Using AI tools to investigate").

Steps to reproduce

index.qmd

---
title: "axe document report omits WCAG tags"
format:
  html:
    axe:
      output: document
---

An image with no `alt` attribute triggers the axe `image-alt` rule, which is
tagged `cat.text-alternatives`, `wcag2a`, `wcag111` (WCAG 2.0 Level A, SC 1.1.1):

![](https://example.com/logo.png)

quarto preview index.qmd

Actual behavior

The overlay has an item like:

Critical: Ensure elements have alternative text or a role of none or presentation

Expected behavior

The overlay has an item like:

Critical · WCAG 2.0 A (1.1.1) : Ensure elements have alternative text or a role of none or presentation

Your environment

  • IDE: n/a — reproduced with the Quarto CLI directly from the terminal (editor: Positron)
  • OS: macOS 26.5.1 (build 25F80)

Quarto check output

Quarto 1.10.8
[✓] Checking environment information...
      Quarto cache location: /Users/charlottewickham/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.8.3: OK
      Dart Sass version 1.87.0: OK
      Deno version 2.7.14: OK
      Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.10.8
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2026.04
      VeraPDF: 1.28.2
      Chrome Headless Shell: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/charlottewickham/Library/TinyTeX/bin/universal-darwin
      Version: 2026

[✓] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
      Source: MacOS known location

[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
      Version: 4.6.0
      knitr: 1.51
      rmarkdown: 2.31
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
      Version: 3.12.2
      Jupyter: 5.9.1
      Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking Julia installation.......OK

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibilitybugSomething isn't workinghtmlIssues with HTML and related web technology (html/css/scss/js)

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions