Loading Developer Playground

Loading ...

Skip to main content

Success Criterion · WCAG 4.1.1

Parsing

In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features. Note: This criterion is obsolete and always considered to pass in WCAG 2.2.

Level AWCAG 2.0Robust4.1 · Compatible
Copy button ready

Goal

Ensure markup can be interpreted reliably by user agents and assistive technologies.

What to do

Avoid malformed markup and ensure elements are properly nested and have unique IDs where required.

Why it matters

Parsing errors can break accessibility trees and cause assistive technologies to misinterpret content.

Success criterion

What WCAG 4.1.1 requires

Summarized directly from the official Understanding document so teams can quote the requirement accurately.

In content implemented using markup languages, elements have complete start and end tags, elements are nested according to their specifications, elements do not contain duplicate attributes, and any IDs are unique, except where the specifications allow these features.

Intent

Why WCAG created this requirement

  • Well-formed markup reduces risk of AT misinterpretation.
  • Unique IDs are important for label associations and references.
  • WCAG 2.2 marks this criterion as obsolete, but good markup hygiene still matters.

Benefits

Who gains when you pass

  • Assistive technologies are more likely to expose correct structure and relationships.
  • Developers reduce hard-to-debug accessibility issues caused by invalid DOM.
  • Users get more consistent experiences across browsers and AT combinations.

Why it matters

User impact when this criterion fails

Summaries drawn from the Understanding document help you socialize impact statements with product stakeholders.

Invalid nesting can cause screen readers to announce content in unexpected ways.

Duplicate IDs can break label associations and ARIA references.

Overview

This criterion is marked as obsolete in WCAG 2.2 because modern browsers recover from many parsing issues, but it can still be useful to avoid malformed markup. Ensure valid nesting, no duplicate attributes, and unique IDs.

  • Prefer automated linting/validation in CI to catch duplicate IDs and invalid nesting.
  • Avoid generating duplicate IDs in repeated components.
  • Validate HTML output for dynamic content and templating systems.

Reference: All summaries and highlights originate from Understanding WCAG 4.1.1 and the W3C quick reference.

Fast facts

Conformance level
Level A
WCAG version introduced
WCAG 2.0
Principle
Robust
Guideline
4.1 · Compatible

Examples

Make success tangible for teams

Share pass/fail snapshots to coach designers, engineers, QA, and content authors.

Duplicate IDs

Pass

Each form field has a unique id used by its label.

Fail

Multiple inputs share id="email", breaking label association.

Nesting

Pass

List items are inside `<ul>`/`<ol>` and headings are properly nested.

Fail

A `<div>` is placed directly inside `<ul>` without `<li>`.

Evidence to keep

Document conformance decisions

Capture artifacts for VPATs, procurement reviews, and regression testing.

  • Document ID generation strategy for components.
  • Record markup validation checks as part of QA/CI.

Official resources

Deep dives and supporting material

Keep these links handy when writing acceptance criteria or responding to audits.

Implementation checklist

Capture progress and blockers

  • Ensure unique IDs for all referenced elements (labels, describedby, labelledby).
  • Avoid duplicate attributes and invalid nesting.
  • Use HTML validation tools during development.
  • Audit component libraries for repeated ID patterns.

Testing ideas

Prove conformance with evidence

  • Run HTML validation on representative pages.
  • Use accessibility tree inspection to verify correct relationships and structure.
  • Search for duplicate IDs in rendered output.

Related success criteria

More from Compatible (4.1)

View all criteria