Potential A11y Violation:
Malformed list element
Point of Failure
Lists should be structured correctly (only contain <li>
, <script>
or template elements -- where the script or template elements exist to generate the li
elements).
Available Automation Evaluation
In checking known available linting and testing tools, these are our findings.
Linting Could Exist
It's possible that a linting rule could be created for this potential failure. Check for ul
and ol
elements, check that the role is not defined differently, and ensure the correct descendants.
Testing Exists
See the axe-core
library for the list
rule.
Other Test Methods
In addition to automated tests, there are other types of tests that could be conducted to prevent this potential violation.
Developer Authored Test Could Exist
Developers should make sure that their code does not violate this rule, and try to write a test that would prevent a regression in accessibility if the code is later changed.
Manual Test Exists
Review page and ensure the point of failure does not exist, inspecting the DOM where required.