dequelabs / dequelabs/axe-core
failureSummary for 'listitem' rule describes the problem but does not prescribe a fix
- 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 `
- ` or `
- elements must be contained in a
- or
- elements are used semantically`
- `helpUrl`: https://dequeuniversity.com/rules/axe/4.12/listitem
- `
- `description`: `Ensure - elements are used semantically`
- `, 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`: `
Contributor 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