Skip to main content
guide6 min readUpdated: October 2025

ARIA Labels & Semantic HTML: Building for Screen Readers

Understand the difference between ARIA and semantic HTML. Learn when to use each for maximum screen reader accessibility and WCAG compliance.

Understanding Screen Reader Accessibility

Screen readers are software programs that read web content aloud to users. Approximately 2.2 billion people worldwide have visual impairments, and many rely on screen readers to access digital content. A screen reader's effectiveness depends entirely on how websites are coded. Screen readers interpret HTML markup and present it as structured information. A screen reader announces headings, navigates between form fields, identifies buttons, and announces interactive element states. The better your HTML markup describes your content structure and functionality, the better the screen reader experience. HTML includes semantic elements specifically designed to convey meaning. These elements communicate structure and function inherently. ARIA (Accessible Rich Internet Applications) provides additional markup for complex components that HTML doesn't adequately describe. Understanding when to use semantic HTML and when to supplement it with ARIA is the key to accessible development.

Semantic HTML: The Foundation

Semantic HTML uses tags that inherently communicate meaning. A `<button>` element means "this is a button." A `<nav>` element means "this is navigation." A `<h1>` element means "this is a heading." Screen readers understand these meanings and present them appropriately. <nav> - Indicates primary navigation. Screen readers announce this, allowing users to skip navigation or navigate directly to it. <main> - Identifies primary content. Used with skip links to help keyboard users navigate directly to content. <article> - Indicates independent, self-contained content. Screen readers announce article boundaries. <section> - Groups related content. Screen readers can navigate between sections. <aside> - Indicates supplementary content. Screen readers announce this as secondary content. <header> and <footer> - Indicate header and footer areas. Screen readers announce these structural landmarks. <h1>–<h6> - Indicate heading hierarchy. Screen reader users navigate by headings and expect proper hierarchy. <button> - Creates keyboard-accessible button. Includes automatic focus management and keyboard support. <a> - Creates link. Keyboard-accessible and properly announced by screen readers. <label> - Associates text with form input. Screen readers announce label content when input receives focus. When a semantic element can accomplish your goal, use it instead of ARIA. A `<button>` element automatically provides keyboard support, focus management, and proper screen reader announcement. Creating a button with a div and ARIA requires recreating all this functionality. The principle is straightforward: semantic HTML first, ARIA second. Use semantic elements whenever possible, then use ARIA to supplement where necessary.

ARIA Attributes: When and How to Use Them

ARIA (Accessible Rich Internet Applications) provides attributes that supplement semantic HTML for complex components or situations where semantic HTML doesn't provide adequate information. While semantic elements are preferred, ARIA role attributes can provide landmark information: <nav role="navigation">...</nav> <main role="main">...</main> <div role="complementary">Sidebar</div> aria-label provides a label for elements that don't have visible text labels. Icon-only buttons commonly use aria-label: <button aria-label="Close menu">✕</button> aria-labelledby links an element to another element that labels it: <h2 id="modal-title">Confirm Delete</h2> <div role="dialog" aria-labelledby="modal-title">...</div> aria-describedby links an element to descriptive content: <input id="password" aria-describedby="pwd-hint"> <p id="pwd-hint">Password must be 8+ characters</p> aria-hidden="true" hides elements from screen readers. Use this for decorative elements: <img src="star.svg" alt="" aria-hidden="true"> aria-disabled="true" indicates disabled state: <button aria-disabled="true">Submit</button> aria-checked, aria-selected, aria-pressed indicate component state: <div role="checkbox" aria-checked="true">...</div> aria-expanded indicates whether a collapsible section is open: <button aria-expanded="false" aria-controls="menu">Menu</button> aria-live announces dynamic content updates: <div aria-live="polite">Item added to cart</div>

ARIA Roles: When You Need Them

ARIA roles assign semantic meaning to elements that lack semantic HTML equivalents. However, using semantic elements eliminates the need for most role attributes. Use ARIA roles only when semantic HTML doesn't provide the needed meaning. For example: ✅ Correct: `<button>Open Menu</button>` (semantic element, no ARIA needed) ❌ Incorrect: `<div role="button">Open Menu</div>` (recreates button with ARIA and requires additional keyboard handling) ✅ Appropriate ARIA: `<div role="dialog">...</div>` (no semantic HTML element exists for dialogs) dialog - Indicates a modal dialog. Must manage focus and handle Escape to close. alert - Announces important information immediately. Screen readers interrupt to announce alerts. tab, tablist, tabpanel - Structures tab components with proper keyboard navigation. menuitem, menu - Structures menu components with arrow key navigation. slider - Indicates a range input. Arrow keys adjust value.

Common Mistakes and Anti-Patterns

Understanding what not to do helps ensure your markup is genuinely accessible. ❌ Wrong: `<div role="button" onclick="...">Click me</div>` This requires manual implementation of keyboard support, focus management, and screen reader announcements. ✅ Right: `<button>Click me</button>` ❌ Wrong: Adding ARIA to elements that already have semantic meaning. <h1 role="heading">Page Title</h1> The `<h1>` element already indicates a heading. The role attribute is redundant. Using ARIA to add screen reader support without ensuring keyboard support creates barriers for keyboard-only users. A custom button with aria-label still needs keyboard handlers. Use semantic `<button>` which handles this automatically. ❌ Wrong: Jumping heading levels or using headings out of order. <h1>Page Title</h1> <h3>Subsection</h3> <!-- Should be h2 --> ❌ Wrong: Using aria-label on text elements that already have visible text. <h2 aria-label="Important Section">Important Section</h2> The visible text serves as the label. aria-label isn't needed.

Practical Implementation: Building an Accessible Form

Let's walk through building an accessible form with semantic HTML and appropriate ARIA: <form> &nbsp;&nbsp;<label for="email">Email Address</label> &nbsp;&nbsp;<input id="email" type="email" required> &nbsp;&nbsp;<label for="message">Message</label> &nbsp;&nbsp;<textarea id="message"></textarea> &nbsp;&nbsp;<button type="submit">Send</button> </form> <form> &nbsp;&nbsp;<label for="email">Email Address</label> &nbsp;&nbsp;<input id="email" type="email" required aria-describedby="email-help"> &nbsp;&nbsp;<small id="email-help">We'll never share your email</small> &nbsp;&nbsp;<label for="message">Message</label> &nbsp;&nbsp;<textarea id="message" aria-describedby="msg-count"></textarea> &nbsp;&nbsp;<div id="msg-count" aria-live="polite">0 characters</div> &nbsp;&nbsp;<button type="submit">Send</button> </form> <form> &nbsp;&nbsp;<label for="email">Email Address</label> &nbsp;&nbsp;<input id="email" type="email" required aria-invalid="false" aria-describedby="email-error"> &nbsp;&nbsp;<span id="email-error" role="alert"></span> </form> On validation error, set aria-invalid="true" and populate the error span with the error message. The role="alert" ensures screen readers announce the error immediately.

Testing Semantic HTML and ARIA

Verify your markup works with screen readers by testing with actual assistive technology. Test with free screen readers like NVDA (Windows) or VoiceOver (macOS/iOS). Navigate your page and verify that all content is accessible and properly announced. Tools like axe DevTools identify ARIA misuse and incorrect semantic markup. However, automated tools can't verify that your ARIA implementation actually works with screen readers—human testing is essential. Modern browser developer tools display accessibility information. Right-click elements and select "Inspect" to see the accessibility tree, showing how assistive technology perceives your markup. Review code to ensure semantic HTML is used when possible and ARIA supplements rather than replaces semantic meaning.

Put This Knowledge Into Practice

Use A11yScan to test your website against WCAG standards automatically.

Start Free Scan

Frequently Asked Questions

Why does web accessibility matter?

Web accessibility ensures people with disabilities can perceive, understand, navigate, and interact with websites. It also reduces legal risk and improves user experience for everyone.

What is WCAG?

WCAG (Web Content Accessibility Guidelines) are international standards published by the W3C that define how to make web content more accessible to people with disabilities.

More Resources

checklist

Complete WCAG 2.1 AA Checklist for Web Accessibility

statistics

Web Accessibility Lawsuit Statistics 2024: Complete Analysis

guide

ADA Website Requirements 2024: Complete Compliance Guide

tutorial

Complete Screen Reader Testing Guide for Accessibility

statistics

2024 Accessibility Lawsuit Trends: What the Data Shows

guide

2025 Accessibility Litigation Predictions: What to Expect

guide

What to Do If You Receive an Accessibility Demand Letter | A11yscan

guide

Why WCAG Accessibility Overlays Fail | A11yscan

guide

Accessibility as Enterprise Risk Management: 2024-2025 Analysis

guide

Accessibility Statement: Legal & User Importance

statistics

ADA Website Lawsuits Surge 37% in 2025: Legal Risks, Trends, and Business Impact | A11yscan

guide

The ADA & Your Website: Legal Requirements in 2025

guide

ADA Title III & Web Accessibility: What You Need to Know | A11yscan

guide

Alt Text That Actually Works: Writing for Screen Readers

guide

AODA: Accessibility for Ontarians with Disabilities Act | A11yscan

guide

AODA: Accessibility for Ontarians with Disabilities Act | A11yscan

guide

Accessibility Conformance Reports (ACRs): Legal Guide

guide

The CEO\'s Guide to ADA Compliance - A11yscan Blog

guide

Corporate Legal Risk: Your Website Might Be Your Biggest Liability

guide

How to Document Website Accessibility Barriers

guide

E-Commerce Accessibility: Why Your JavaScript Catalog Is Breaking Millions of Sales

guide

Focus Management & Tab Order: Fixing Keyboard Navigation

guide

Forms & Input Accessibility: The #1 ADA Violation

guide

Remediation vs. Retrofit vs. Rebuild: Strategic Accessibility

guide

Restaurant Websites & Accessibility: Why Beautiful Menus Fail

guide

Accessibility Audits: What a Proper Audit Includes

guide

TikTok\'s Captions: How Social Media Accidentally Normalized Accessibility

checklist

The 10-Point WCAG Pre-Launch Checklist - A11yscan Blog

statistics

WCAG Lawsuit Legal Terms: Standing, Nexus, Harm & Damages

guide

California Web Accessibility Laws: Unruh Act, AB 434, AB 1757 | A11yscan

guide

Color Contrast: The Foundation of Visual Accessibility

guide

Designing for Blind Users: Screen Reader Accessibility

guide

Designing for Cognitive Disabilities: Clear & Simple Navigation

guide

Designing for Deaf Users: Audio Accessibility

guide

Designing for Low Vision Users: Vision Accessibility

guide

Designing for Motor Disabilities: Keyboard & Switch Access

guide

Designing for Neurodivergent Users: Accessibility Beyond Disability

guide

Your Rights as a Person with Disabilities: Web Accessibility Protections

guide

Div Soup: Why Pretty But Broken Websites Cost More Than You Think | A11yscan

guide

How to Document and Report Web Accessibility Issues

guide

European Accessibility Act (EAA): EU Digital Accessibility Requirements | A11yscan

guide

Finding Legal Support for Web Accessibility Claims

guide

Florida Web Accessibility Laws: ADA Title III, Section 508, and Florida Standards | A11yscan

guide

Keyboard Navigation: Making Your Site Usable Without a Mouse

guide

Defending Against Accessibility Claims: Good Faith Strategies

statistics

Major 2024 Accessibility Settlements: Case Studies and Lessons

guide

Maps & Data Visualizations Accessibility: Charts, SVG, Colorblindness

guide

Mobile Accessibility: Why 40% of Your Users Can\'t Use Your Site on Mobile | A11yscan

guide

NYCHRL: New York City Digital Accessibility Rights Law | A11yscan

guide

PDF Accessibility: Tagging, Forms, OCR & Legal Requirements

guide

Platform Liability: When Third Parties Create Accessibility Barriers

guide

You Used a Template. Your Site Is Still Broken. Your Liability Is Still Real. | A11yscan

guide

SEO and WCAG: How Accessibility and Search Rankings Are Linked | A11yscan

guide

Serial Filers and the ADA Enforcement Gap: Why Disabled Users Bear the Burden

guide

The Silver Economy & Web Accessibility: Why Seniors Need Better Website Design | A11yscan

guide

Temporary Disabilities & Accessibility: Broken Mice, Injured Arms, Lost Glasses | A11yscan

guide

Understanding Your Rights as a User Requiring Web Accessibility Features

guide

Video & Multimedia Accessibility: Captions, Descriptions, Transcripts

guide

Understanding WCAG 2.1 Levels: A vs AA vs AAA

guide

WCAG 2.1 vs 2.2: What Changed and Why It Matters for Your Compliance | A11yscan

guide

You Sell Products, Not Websites. But Your Website Still Needs to Be Accessible. | A11yscan

Ready to Improve Your Accessibility?

Start with a free accessibility scan and get actionable insights immediately.

Start Free Accessibility Scan