WCAG 4.1.1 — Parsing — HTML has duplicate IDs or invalid nesting
Your website's HTML code has structural errors like duplicate IDs or improperly nested tags. These coding mistakes prevent screen readers and other assistive technologies from properly interpreting your content, creating barriers for disabled users under ADA Title II requirements.
Who Is Affected
Users of screen readers, voice control software, browser extensions for accessibility, and other assistive technologies that rely on properly structured HTML code to function correctly.
What This Means
HTML parsing errors occur when your website's underlying code violates the basic rules of HTML markup. The most common issues are:
- Duplicate IDs — Multiple elements with the same ID attribute (IDs must be unique on each page)
- Invalid nesting — Tags placed inside other tags where they don't belong (like putting a
<div>inside a<p>) - Unclosed tags — HTML elements that are opened but never closed
- Missing required attributes — Elements that need certain attributes to be valid
While these errors might not be visible to sighted users, they can cause assistive technologies to malfunction, skip content, or provide incorrect information about the page structure.
Fix: CMS / Theme
Most parsing errors originate in your theme's template files or are generated by plugins/modules that output invalid HTML.
Joomla
- Check template overrides in
/templates/your-template/html/for invalid nesting - Review module positions — ensure modules aren't generating duplicate IDs
- Test third-party extensions by temporarily disabling them to isolate problematic code
- Update to latest Joomla version — newer releases fix many parsing issues
WordPress
- Switch to a default theme temporarily to test if the issue persists
- Deactivate plugins one by one to identify those generating invalid HTML
- Check theme's
functions.phpfor code that might output duplicate IDs - Review custom post type templates for proper HTML structure
Both Platforms
- Use the W3C Markup Validator to test your homepage and key landing pages
- Fix template-level issues that affect multiple pages simultaneously
- Ensure any custom HTML added to theme files follows proper nesting rules
Fix: Content Editor
Some parsing errors are introduced through the content management interface:
- Switch to HTML/Code view in your editor to examine the raw markup
- Look for duplicate ID attributes — search for
id="and ensure each ID appears only once per page - Check for improperly nested elements:
- Don't put block elements like
<div>inside<p>tags - Ensure lists (
<ul>,<ol>) only contain<li>elements as direct children - Verify heading tags follow proper hierarchy (
<h1>, then<h2>, etc.)
- Don't put block elements like
- Remove any unclosed tags — every opening tag needs a corresponding closing tag
- Validate custom HTML snippets before adding them to content
Common Content Editor Mistakes:
- Copying and pasting from Word documents (often introduces invalid markup)
- Manually typing HTML without proper closing tags
- Using the visual editor's formatting tools excessively, which can create nested tags
Standard Reference
WCAG 2.1 Success Criterion 4.1.1 — Parsing, Level A
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.
Helpful Tools
Check if your government website has this issue
OctoComply scans your website and documents for WCAG 2.1 AA violations. The free tier covers up to 10 pages.
Run a Free Scan