Skip to content

label-content-name-mismatch: axe-core 4.14 (#7289) now runs Label in Name, failing 17 journeys #7393

Todo

Description

@leaf-agent

axe-core 4.14 runs label-content-name-mismatch (WCAG 2.5.3, Label in Name) by default, and 17 journeys that read pages with axe now fail on it. #7289 bumped axe-playwright-python from 0.1.8 to 0.1.9. The bundled axe.min.js moved from axe v4.12.1 to v4.14.0, and the rule lost its experimental tag, which is what kept it from running by default. I checked this by downloading both wheels and reading the rule's tags in each bundle. The rule reports an element whose accessible name, set by aria-label or another attribute, leaves out its visible text.

Failing tests (test-macos in scheduled run 45985529285 on 21c613f05; every finding is label-content-name-mismatch (serious)):

  • tests/journeys/test_render_gate.py::test_page_fixture_renders for alert-review, github-discoveries, pr-walkthrough, review-parts, review-a-fix, rust-sort, wt-merge, file-tree-input, diff-thread-gallery, playwright-trace-gallery, file-tree, worktree-diffs, thread-panel-gallery, playwright-paired-results and sidebar-contents
  • tests/journeys/test_render_controls.py::test_the_chrome_a_key_opens_has_no_serious_violations[420-dark] and [1200-light] (focused in Threads)

The Linux test job of that run stopped in setup (a 403 from packages.microsoft.com during playwright install --with-deps), so these journeys didn't run on Linux. The rule doesn't depend on the platform, so I expect the same failures there, but no run has shown it yet. None of these tests failed in the previous scheduled run, 45805148564, on 7836b3859, which came before #7289.

Elements reported, grouped by the selector axe prints:

  • span[aria-controls=…], the most common: ar-canary, ar-latency and the rest on alert-review, and parts-overview, parts-run-list and the rest on review-parts. These look like the entries of a side list or parts list whose name is set apart from their text.
  • The floating panel's buttons button[aria-label="Threads"], [aria-label="On Me"] and [aria-label="On Codex"]. Their visible text probably includes something beyond the label, such as a count.
  • a[aria-label="PrefectHQ/colin"] and others on github-discoveries, article[data-change=…] > …, button[aria-controls="fix-before-image-scale-options"] and button[aria-description="Fit · 92%"].

Diagnosis so far. Each finding is a real WCAG 2.5.3 gap: a voice-control user who says the visible words can't reach the control. So the repair belongs in each name's owner, which should make the accessible name contain the visible text, or drop the aria-label where the text already names the control. Excluding the rule would hide that gap. Before choosing names, read .claude/skills/developing-leaf/references/glossary.md, since the panel's button names are user-facing text. The full findings, one per page and scheme, are in the run's test-macos log under each test_page_fixture_renders[...] failure.

Cause of a failure tracked in #7391.

Activity

  1. added
    tend-ci-cause
    on Nov 27, 2026
  2. leaf-agent commented on Nov 27, 2026

    @leaf-agent
    CollaboratorAuthor

    #7403 fixes the Leaf-owned findings. Each control is now named by the words it shows: panel tabs ("Threads 2"), lf-tabs rows, diff line numbers on unchanged lines, the trace's image-scale button, margin entries holding several threads, and the two examples' speed buttons. The github-discoveries avatar, a duplicate link, is now hidden from assistive tech. With it, the render gate passes locally on 13 of the 15 failing pages. Its CI and landing are with tend-land, and it says Refs, so this issue stays open for two parts:

    • file-tree, file-tree-input. @pierre/trees 1.0.0, the latest release, names each row by its path (getFileTreeRowAriaLabel in render/FileTreeView.js) and draws the git-status letter (M, A, D, R) beside it, outside the name. axe doesn't exempt aria-hidden text from this rule, so Leaf can't fix it by hiding the letter. The repair is upstream, or a change to how lf-file-tree.js passes git status.
    • test_the_chrome_a_key_opens_has_no_serious_violations. Once the panel tabs pass, this sweep reaches the command reference. Each option there is named by its title alone (aria-labelledby, in browser/runtime/panel/page-keys/command-reference.js), while the row also shows its key chips and description. Fixing it means choosing what a screen reader hears for every row of the key reference, which I left out of fix: name panel tabs, list rows, diff gutters, the trace's scale and margin entries by the words they show #7403.
  3. leaf-agent commented on Nov 28, 2026

    @leaf-agent
    CollaboratorAuthor

    #7491 fixes the command-reference part. Each row of ? now takes its accessible name from its own content (title, spoken keys, description), so the sweep test_the_chrome_a_key_opens_has_no_serious_violations passes at both widths. It failed on main at cd2495ac7. A screen reader hears the same words as before, but now all of them are in the name. Naming a row by its title plus the chips' spoken label isn't enough: the chips show glyphs (⌘, arrows) that the spoken label doesn't contain, so axe still flags it. The PR says Refs, and its CI and landing are with tend-land.

    What remains: file-tree, file-tree-input. Both still fail on main. I probed the rows in a browser: every flagged row is a path that carries a git status. Its name is the file name (config.rs), and its visible text adds the status letter (M, A). That comes from @pierre/trees 1.0.0: getFileTreeRowAriaLabel names the row, and getBuiltInGitStatusDecoration draws the letter as text outside the name. Neither can be configured from lf-file-tree.js, which passes status through tree.setGitStatus. One folder row (picker) is flagged too. I didn't establish which of its text falls outside the name. I see two ways to fix this:

    • Upstream: have Trees put the status word in the row's name, or draw the letter in a way axe doesn't count as text. @pierre/trees names no repository in its package.json, so I haven't found where to file this.
    • In Leaf: stop passing status to setGitStatus, and draw it through Trees' renderRowDecoration as an icon with a title. This changes how a changed file looks in every file tree, so I haven't made it here.
  4. leaf-agent commented on Nov 29, 2026

    @leaf-agent
    CollaboratorAuthor

    This issue now waits on a maintainer decision about how a file tree shows git status. #7403 and #7491 have merged. In the scheduled run after them, 46137118943 at ad7b71b63, only test_page_fixture_renders[file-tree] and [file-tree-input] still report label-content-name-mismatch, in both test and test-macos. No later commit touches packages/file-tree or the @pierre/trees pin.

    The findings are the ones the previous comment traced. @pierre/trees 1.0.0 names each row with aria-label set to its path, then draws the status letter (M, A) as text inside the button. Leaf's only input is tree.setGitStatus. Trees' label options change the letter's title, not the row's name, so lf-file-tree.js can't close the gap through configuration. That leaves two routes, and both need a call I won't make for every file tree:

    • Upstream. Trees would put the status in the row's name. The package names no repository, so I don't know where to report it.
    • In Leaf. Stop calling setGitStatus, and draw the status through renderRowDecoration as an icon with a title. Every changed file in every file tree would look different, and the data-item-git-status attribute that Trees sets on each row would go away.

    Which one should it be? If the answer is the Leaf route, the next run will build it and post before and after stills of file-tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

tend-ci-cause

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions