Why this matters
Invalid HTML can cause assistive technologies to misinterpret page structure. Duplicate IDs break label associations and ARIA relationships. Malformed markup leads to unpredictable behavior across browsers and screen readers.
Common failures
These are the most frequent ways this criterion is violated in real-world websites:
- Duplicate id attributes on the same page
- Unclosed elements or incorrect nesting
- Duplicate attributes on the same element
- ARIA attributes referencing non-existent IDs
How to fix
- Validate HTML using the W3C validator or axe-core
- Ensure all id values are unique within the page
- Fix any unclosed tags or incorrect nesting
- Verify all aria-labelledby and aria-describedby references point to existing elements
Related axe-core rules
xsbl uses axe-core to automatically detect violations of this criterion. The following rules are checked:
Check your site for 4.1.1 violations
xsbl scans your rendered pages in a real browser and finds violations of this criterion automatically.
Scan your site freeOfficial reference: Understanding WCAG 4.1.1: Parsing (W3C)