dequelabs / dequelabs/axe-core

failureSummary for 'listitem' rule describes the problem but does not prescribe a fix

Open Beginner friendly
#5,290 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 23h
Merged PRs (30d)
17

Description

## Summary

For the `listitem` rule, `failureSummary` reads:

```
Fix any of the following:
List item parent element has a role that is not role="list"
```

This describes **why** the element failed (the parent has a non-list role) but does not tell the developer **how to fix it**. A helpful suggestion would be something like: _"Ensure the `

  • ` element is a direct child of a `
      ` or `
        `, or that the parent element has `role=\"list\"`."_

        ## Contrast with other rules

        Rules like `color-contrast` provide genuinely actionable `failureSummary` text — e.g. the exact contrast ratio, foreground/background colors, and the expected threshold. The `listitem` summary reads more like a restatement of the failure condition than a remediation guide.

        ## Impact

        Tools that surface `failureSummary` directly to end users (including accessibility reporting tools) end up showing diagnostic text in a "Suggested Fix" column, which is confusing to non-technical testers.

        ## Expected behavior

        `failureSummary` should complete the sentence "To fix this, you should…" — not restate what was already expressed by the rule's `help` or `description` fields.

        ## Rule details

        - Rule ID: `listitem`
        - axe-core version: 4.12.x
        - `help`: `

      1. elements must be contained in a
          or
            `
            - `description`: `Ensure
          1. elements are used semantically`
            - `helpUrl`: https://dequeuniversity.com/rules/axe/4.12/listitem
  • Contributor guide

    Open the contributing guide

    Research direction

    Start by locating the `listitem` rule and the code or tests that generate its `failureSummary`. Compare the current summary with the issue's expected remediation guidance and nearby actionable summaries. Done means the `listitem` summary tells users how to correct the parent or element relationship, with tests covering the revised wording.

    Written by the indexing model from the issue text.

    Assessment

    Tech stack
    javascript
    Domain
    accessibility
    Issue type
    Bug
    Difficulty
    2/5
    Estimated time
    1-3 hours
    Activity status
    Active
    Clarity
    Mostly clear
    Newbie friendliness
    68/100

    Get new issues in your inbox

    A short digest of beginner-friendly GitHub issues.