Common WCAG Violations and How to Fix Each One (2026)
Common WCAG violations on real sites, from low contrast to unlabeled form fields: the success criterion, why each one fails and the code that fixes it.
Kazi Khalid Hasan Tamim · BugViso Team
16 min read
The most common WCAG violations are low color contrast, missing image alt text, form inputs without labels, missing visible focus indicators, and broken heading or landmark structure.
Each has a short fix: keep text at 4.5:1 contrast, describe images, tie a <label> to every input, never remove focus outlines without a replacement, and use semantic headings.
Web accessibility is neither an optional aesthetic preference nor a secondary feature tier; it is a fundamental engineering requirement. WebAIM's annual Million report finds detectable WCAG failures on nearly every top homepage, mostly from a handful of recurring mistakes.
Understanding and remediating common WCAG violations protects organizations from legal liability, expands total addressable market reach, and improves usability across all devices.
Understanding WCAG 2.1 A & AA Conformance: Levels and Legal Benchmarks
The W3C WCAG 2.1 Quick Reference Guidelines are organized around four core principles known as POUR:
- Perceivable: Information and user interface components must be presentable to users in ways they can perceive (e.g., text alternatives for non-text content, adequate color contrast).
- Operable: User interface components and navigation must be operable via diverse input methods, including keyboards, switch devices, and voice commands.
- Understandable: Information and the operation of the user interface must be clear, predictable, and forgiving of user input errors.
- Robust: Content must be robust enough to be interpreted reliably by a wide variety of user agents, including assistive technologies.
| Level | Conformance Standard | Legal and Industry Scope |
|---|---|---|
| A | Minimum baseline (basic accessibility) | Essential requirements; failure blocks users entirely |
| AA | Industry standard | The target benchmark for ADA, Section 508, EAA and corporate compliance |
| AAA | Specialized (enhanced support) | High-barrier criteria targeted at dedicated accessibility UIs |
| Violation Description | WCAG Criterion | Default Severity |
|---|---|---|
| Insufficient Contrast | 1.4.3 Contrast Min | Serious |
| Missing Image Alt Text | 1.1.1 Non-text | Critical / Serious |
| Empty / Unlabeled Inputs | 1.3.1 / 4.1.2 Name | Critical |
| Missing Focus Indicators | 2.4.7 Focus Visible | Serious |
| Broken Heading Hierarchy | 1.3.1 Info & Rel | Moderate |
Violation 1: Insufficient Color Contrast (WCAG 1.4.3)
Low text contrast remains the single most common accessibility violation across the web: in our 2026 accessibility statistics it failed on 64.4% of 219 homepages.
When text blends into its background, users with low vision, color blindness, or situational impairments (such as viewing a mobile screen under direct sunlight) cannot read the content.
Our guide to fixing color contrast errors includes a script that finds the nearest passing shade of your own brand color.
According to W3C Understanding Success Criterion 1.4.3: Contrast (Minimum), visual presentation must meet specific mathematical contrast ratios:
| Element Category | Minimum Ratio (AA) | Enhanced Ratio (AAA) |
|---|---|---|
| Regular body text (under 18pt, or under 14pt bold) | 4.5 : 1 | 7.0 : 1 |
| Large text (18pt or larger, or 14pt bold or larger) | 3.0 : 1 | 4.5 : 1 |
| UI components and borders (icons, active states; WCAG 1.4.11) | 3.0 : 1 | 4.5 : 1 |
CONTRAST RATIO FORMULA:
L1 + 0.05
Contrast = ------------------
L2 + 0.05
Where L1 is the relative luminance of the lighter color,
and L2 is the relative luminance of the darker color.The Problem: Muted Gray Styling
Developers often implement design system tokens featuring ultra-light gray text (#94A3B8 on a white #FFFFFF background), producing a contrast ratio of 2.6:1—failing the required 4.5:1 threshold.
/* ANTI-PATTERN: Fails WCAG AA with 2.6:1 contrast ratio */
.subtle-caption {
background-color: #ffffff;
color: #94a3b8; /* FAILS: 2.6:1 */
}
/* REMEDIATED: Passes WCAG AA with 4.6:1 contrast ratio */
.subtle-caption-fixed {
background-color: #ffffff;
color: #64748b; /* PASSES: 4.6:1 */
}
/* HIGH-ACCESSIBILITY: Passes WCAG AAA with 7.1:1 contrast ratio */
.high-contrast-text {
background-color: #ffffff;
color: #334155; /* PASSES: 7.1:1 */
}Violation 2: Missing, Empty, or Inadequate Image Alternative Text (WCAG 1.1.1)
Screen readers cannot interpret pixel data directly. When an <img> tag lacks an alt attribute, screen reader software typically reads aloud the raw filename (e.g., "/assets/uploads/2026/08/hero_banner_v2_final_compressed.webp"), creating a confusing experience for visually impaired users.
For 15 before/after examples by image type, see our guide on how to write alt text.
Image Alt Text Decision Tree
- Is the image purely decorative / visual fluff?
- YES → Use explicit empty alt attribute: alt=""
- NO → Does the image contain text or convey data?
- YES → alt="Exact text / key metric"
- NO → alt="Concise visual context"
The Remediation Rules for Image Alternative Text
- Informative Images: Provide a concise description of the meaning conveyed by the image (e.g.,
alt="Diagram of Redis cluster topology showing master-replica synchronization"). - Decorative Images: If an image is purely cosmetic (such as a background gradient or abstract visual separator), provide an explicit empty attribute (
alt=""). This instructs screen readers to skip the element entirely. Omitting thealttag altogether is a direct WCAG violation. - Functional Images (Icon Buttons): For clickable icons (e.g., a search magnifying glass or social icon), provide an accessible name either via the
alttag or anaria-labelon the enclosing link/button. - Inline SVG Icons: For standalone SVG icons, include
<title>and<desc>child elements and declarerole="img":
<!-- Accessible SVG Pattern -->
<button aria-label="Close dialog modal" class="btn-close">
<svg role="img" aria-hidden="true" width="24" height="24" viewBox="0 0 24 24">
<path d="M18 6L6 18M6 6l12 12" stroke="currentColor" stroke-width="2"/>
</svg>
</button>For complete image optimization and asset hygiene workflows, consult our on-page SEO checklist.
Violation 3: Unlabeled Form Controls and Missing Accessible Names (WCAG 1.3.1, 4.1.2)
Form inputs (text fields, checkboxes, radio buttons, and select dropdowns) must possess programmatic accessible names. When a user focuses on a form field using assistive technologies, the screen reader announces the field's label and purpose. The full field-by-field patterns, including errors and autocomplete, are in our guide to accessible forms.
| Implementation Pattern | Accessibility Assessment |
|---|---|
Explicit <label for> | Best Practice (Native programmatic link) |
Enclosing <label> | Good (Implicit wrapper association) |
aria-label Attribute | Acceptable for compact / icon inputs |
placeholder Only | ANTI-PATTERN: Fails WCAG Criteria |
The Placeholder Anti-Pattern
Relying solely on the placeholder attribute to identify input fields is one of the most widespread form failures:
- Placeholders disappear as soon as the user enters text, depriving users of contextual field labels.
- Placeholders are typically styled with low-contrast gray text, violating WCAG 1.4.3.
- Many screen readers do not announce placeholders as accessible names.
<!-- ANTI-PATTERN: Fails WCAG 1.3.1 and 4.1.2 -->
<input type="email" placeholder="Enter your work email address" />
<!-- PRODUCTION REMEDIATION: Explicit Association + Accessible Error Handling -->
<div class="form-group">
<label for="work-email" class="form-label">Work Email Address</label>
<input
type="email"
id="work-email"
name="email"
class="form-input"
aria-describedby="email-hint email-error"
aria-invalid="false"
required
/>
<span id="email-hint" class="field-hint">We will send your audit PDF to this address.</span>
<span id="email-error" class="field-error" role="alert"></span>
</div>Violation 4: Inaccessible Keyboard Navigation and Missing Focus Indicators (WCAG 2.1.1, 2.4.7)
Millions of users navigate the web exclusively using keyboards, switch devices, or screen magnifiers without a mouse. Every interactive element on a webpage must be reachable and operable using the Tab, Enter, Space, and arrow keys.
According to W3C Understanding Success Criterion 2.4.7: Focus Visible, any keyboard-operable user interface must have a mode of operation where the keyboard focus indicator is visibly clear.
Keyboard Navigation & Focus Requirements
- Focus visibility: every interactive element must display a visible focus ring when navigating with the Tab key.
- Logical tab order: focus order must follow the natural visual reading flow (top-to-bottom, left-to-right). Avoid positive
tabindexvalues such astabindex="1". - No keyboard traps: users must be able to navigate into and out of modals and widgets.
The outline: none CSS Disaster
A notorious legacy CSS reset is * { outline: none; } or button:focus { outline: 0; }. Stripping focus outlines without providing a modern replacement completely blinds keyboard users.
/* ANTI-PATTERN: Destroys keyboard accessibility */
button:focus {
outline: none; /* DANGEROUS */
}
/* MODERN SOLUTION: :focus-visible provides clean rings for keyboards only */
button:focus {
outline: none; /* Suppress default outline */
}
button:focus-visible {
outline: 2px solid #2563eb;
outline-offset: 2px;
box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}The :focus-visible pseudo-class applies focus styling exclusively when the user interacts via a keyboard or assistive device, preserving clean mouse click aesthetics while maintaining accessibility compliance.
Violation 5: Illogical Heading Hierarchies and Missing Semantic Landmarks (WCAG 1.3.1, 2.4.6)
Screen reader users often navigate a new page by pulling up an automated list of heading tags (<h1> through <h6>). They also jump between major HTML5 landmark regions (<header>, <nav>, <main>, <aside>, <footer>).
To find these violations across every page, compare accessibility audit tools.
Semantic Landmarks & Heading Structure
- <header>
- <nav aria-label="Main Navigation"> Global Links </nav>
- </header>
- <main id="main-content">
- <article>
- <h1> Primary Page Heading (Single Master Topic)
- <h2> Major Section 1
- <h3> Detailed Subsection 1A
- <h3> Detailed Subsection 1B
- <h2> Major Section 2
- </article>
- </main>
- <footer> Company Information & Legal Links </footer>
Key Structural Requirements:
- Never Skip Heading Levels: Jumps such as
<h1>$\rightarrow$<h3>or<h2>$\rightarrow$<h5>break the outline hierarchy, causing confusion for assistive technology users. - Provide a
<main>Landmark: Every page must contain a single<main>element enclosing the primary unique content of the page, allowing users to bypass global navigation headers with skip links. - Provide a "Skip to Content" Link: Implement an accessible skip navigation link as the first focusable element on the page:
<!-- Skip to Main Content Link -->
<a href="#main-content" class="skip-link">Skip to main content</a>
<style>
.skip-link {
position: absolute;
top: -100px;
left: 1rem;
background: #000;
color: #fff;
padding: 0.75rem 1.5rem;
z-index: 9999;
transition: top 0.2s;
}
.skip-link:focus {
top: 1rem;
}
</style>How BugViso Automates Accessibility Auditing with axe-core
Manually checking every DOM element, color contrast ratio, form label, and heading hierarchy across hundreds of responsive URLs is inefficient and difficult to scale across continuous deployment pipelines.
BugViso integrates the self-hosted, industry-standard axe-core accessibility engine directly into its multi-page Chromium audit worker:
How the accessibility check runs
- The target URL is submitted to the scanner and loaded in headless Chromium.
- A self-hosted axe-core engine is injected and runs the WCAG 2.0 / 2.1 / 2.2 Level A and AA rules.
- Violations are classified into four impact tiers:
- Critical: missing form labels, keyboard traps.
- Serious: insufficient color contrast, missing alt text.
- Moderate: skipped heading levels, landmark issues.
- Minor: non-critical semantic enhancements.
- The exact CSS selectors for each failure are extracted into a prioritized remediation playbook and the branded PDF report.
When you run an automated website scan on BugViso, the audit pipeline executes the following checks:
- Direct DOM Injection: BugViso injects self-hosted
axe-coredirectly into the live rendered DOM, evaluating accessibility states after client-side JavaScript hydration has completed. - Impact Severity Categorization: Every detected violation is categorized by impact level—Critical, Serious, Moderate, and Minor—allowing your engineering team to prioritize blockers before minor cosmetic issues.
- Selector Attribution: BugViso returns the exact CSS selector, HTML code snippet, and failure summary for each violating DOM node.
- Multi-Page Site-Wide Rollups: Across the multi-page site crawl, BugViso aggregates total accessibility violations, flagging systemic template errors across your entire application. Learn more in our full website audit checklist.
- Actionable Remediation Playbook: Pair detected violations with concrete developer remediation steps inside the interactive web UI and downloadable executive PDF report. For guidance on interpreting your scorecard, review our guide on how to read a website audit report.
For the full list of what BugViso tests here, see the automated WCAG 2.2 audit.
Common Accessibility Remediation Traps to Avoid
When remediating accessibility issues, developers often introduce new anti-patterns:
| Anti-Pattern Trap | Production-Ready Solution |
|---|---|
| Div Buttons (<div click>) | Use native <button type="button"> |
| Clickable Text Links | Ensure anchor text describes destination |
| Unannounced Modal Closes | Manage focus state and use aria-modal |
overflow-x: hidden on body to stop sideways scroll | Find and resize the overflowing element, as in our guide to fixing horizontal scroll on mobile (WCAG 1.4.10 Reflow) |
1. The First Rule of ARIA: "No ARIA Is Better Than Bad ARIA"
Developers frequently wrap custom elements in complex ARIA roles (<div role="button" tabindex="0">) instead of using native semantic elements (<button>). Native HTML elements provide built-in keyboard support, focus management, and accessibility APIs for free. Our list of common ARIA mistakes shows the seven patterns that do the most damage.
2. Generic Anchor Text
Links labeled "click here," "more," or "read more" fail WCAG 2.4.4 (Link Purpose). Screen reader users who browse via link lists will hear a repetitive sequence of "click here, click here, click here." Write descriptive links that specify the destination.
Frequently Asked Questions About WCAG Violations
How do you fix WCAG errors?
Fix them in order of impact: contrast, names and labels, focus, then structure. Run an automated scan, change the source markup or CSS (not an overlay), and rescan. Our guides cover color contrast errors and undersized tap targets in detail.
What is the difference between WCAG Level A, AA, and AAA?
Level A establishes the absolute minimum accessibility requirements; failing Level A makes content impossible for some users with disabilities to access. Level AA addresses the most common barriers across digital platforms and represents the standard benchmark for legal compliance (including ADA and EAA). Level AAA provides specialized, high-tier accessibility enhancements for dedicated audiences. WCAG 2.2 adds six A/AA criteria on top of 2.1; our WCAG 2.2 checklist lists all 55 with what automation can test.
Does automated accessibility testing catch all WCAG violations?
No. Automated testing tools (like axe-core) reliably catch the machine-checkable failures (contrast, missing attributes, invalid ARIA). Deque, which maintains axe-core, estimates roughly 57% of issues by volume, and a smaller share of WCAG success criteria. Other criteria—such as whether an alt text description is contextually accurate or whether a keyboard navigation order makes logical sense—require human manual verification. Our breakdown of what automated accessibility testing catches and misses shows why axe-core's "needs review" results matter as much as its violations.
Can low contrast on disabled buttons fail WCAG?
Under WCAG 1.4.3, text or UI components that are purely inactive or disabled (such as a greyed-out submit button prior to form completion) are explicitly exempt from minimum contrast ratio requirements. However, ensuring disabled buttons remain legible improves overall usability.
What is the European Accessibility Act (EAA)?
The European Accessibility Act is an EU directive requiring a wide range of commercial digital products and services—including ecommerce websites, SaaS applications, banking portals, and mobile apps operating in the EU—to comply with harmonized accessibility standards based on WCAG 2.1 AA.
How often should an application undergo accessibility auditing?
Accessibility audits should be integrated into continuous deployment pipelines to catch code regressions on every release, supplemented by full multi-page crawler audits on a monthly or quarterly basis.
Common WCAG Violations: Summary and Next Steps
Fixing common WCAG violations comes down to five habits. Maintain a minimum 4.5:1 color contrast ratio, provide descriptive alternative text on media assets and associate explicit labels with form inputs. Preserve visible keyboard focus indicators, and enforce clean semantic heading landmarks.
Checking accessibility across many page templates needs automated tooling. A BugViso audit (you sign in first) tests the rendered DOM against WCAG 2.1 A and AA standards with automated axe-core rule verification.
Written by
Kazi Khalid Hasan Tamim · BugViso Team
Kazi writes BugViso’s guides on website audits, Core Web Vitals, technical SEO, accessibility and AI search. The data in them comes from audits BugViso runs in a real Chromium browser, including our 219-site study of website health.
Summarise with AI
Open this guide in your assistant.
Follow BugViso
New guides and audit data as we publish them.
AI visibility tracker
Is your brand in AI answers?
See how often AI assistants mention you, cite your site and rank you against your competitors.
- ChatGPT
- Gemini
- Perplexity
- Claude
- AI Overviews
See where your site stands
Run a free BugViso audit for SEO, speed, accessibility and AI search readiness — with fixes you can ship today.