Back to Blog

Most businesses think of accessibility and performance as two separate concerns. Accessibility is about making your site usable for people with disabilities. Performance is about making your site fast. They seem like different goals requiring different expertise. But in practice, the techniques that make a website accessible are often the same techniques that make it fast, and vice versa.

A website built with clean semantic HTML loads faster than one built with nested divs and JavaScript workarounds. A site that works without JavaScript is more resilient and faster on slow connections. Properly structured content is easier for both screen readers and search engine crawlers to parse. The overlap between accessibility best practices and performance best practices is enormous. For the full walkthrough, start with a deeper look at what Core Web Vitals actually measure.

We build websites that are both fast and accessible, not because those are separate checklists to complete, but because they’re fundamentally connected. Here’s how accessibility and performance reinforce each other, and how getting one right often gives you the other for free.

Semantic HTML: The Foundation of Both

Semantic HTML is the single most impactful thing you can do for both accessibility and performance. Using the right HTML elements for the right purpose, headings for headings, buttons for actions, nav for navigation, main for main content, creates a document structure that browsers, screen readers, and search engines all understand natively.

How Semantic HTML Helps Accessibility

Screen readers rely on HTML semantics to navigate a page. When a screen reader encounters an <h2>, it announces it as a heading and lets the user jump between headings to scan the page. A <nav> element is announced as a navigation region. A <button> element is automatically focusable and can be activated with the Enter key or spacebar.

When developers use <div> and <span> for everything, screen readers have no structural information to work with. Users can’t jump between sections, identify navigation, or understand the page hierarchy. The “fix” is to add ARIA roles and attributes to recreate what semantic HTML provides natively, which adds complexity, weight, and potential for errors.

How Semantic HTML Helps Performance

Semantic HTML is lightweight. A <button> element gives you click handling, keyboard support, focus management, and screen reader accessibility with zero JavaScript. Building the same functionality with a <div> requires JavaScript event listeners, keyboard handlers, focus management, and ARIA attributes. That’s more code to download, parse, and execute.

Across an entire site, the difference adds up:

  • Smaller HTML files. Semantic elements need fewer attributes and wrappers than div-based layouts.
  • Less JavaScript. Native HTML elements handle interactions without custom scripts.
  • Faster parsing. Browsers are optimized to process standard HTML elements quickly.
  • Better rendering. Semantic elements have default styles that often reduce CSS requirements.

The First Rule

Before adding ARIA attributes, ask whether a native HTML element already does what you need. In almost every case, the answer is yes, and the native element is both more accessible and more performant.

ARIA: When You Need It and When You Don’t

ARIA (Accessible Rich Internet Applications) provides attributes that enhance accessibility for complex interactive components. But ARIA is meant to supplement semantic HTML, not replace it. Misused ARIA actually makes accessibility worse, and unnecessary ARIA adds weight to your HTML.

The Five Rules of ARIA Use

  1. Don’t use ARIA if a native HTML element does the job. A <button> is better than <div role="button"> in every way.
  2. Don’t change native semantics. Don’t add role="heading" to a <button>. Use the right element.
  3. All interactive ARIA controls must be keyboard-accessible. If you add role="tab", you must also implement the keyboard interaction pattern.
  4. Don’t use role="presentation" or aria-hidden="true" on focusable elements. This hides content from assistive technology while keeping it focusable, creating a confusing experience.
  5. All interactive elements must have accessible names. Buttons, links, and form fields need text labels that screen readers can announce.

Where ARIA Is Necessary

Some components don’t have native HTML equivalents:

  • Tab panels. HTML doesn’t have a native tab component. ARIA roles (role="tablist", role="tab", role="tabpanel") and properties (aria-selected, aria-controls) are needed.
  • Live regions. When content updates dynamically without a page reload, aria-live tells screen readers to announce the change.
  • Modal dialogs. role="dialog" and aria-modal="true" help screen readers understand that a modal overlay requires attention.
  • Custom comboboxes and autocomplete. Complex input components need ARIA to communicate state and options.

For these components, ARIA is essential. For basic page structure, navigation, forms, and content, semantic HTML handles everything.

The fastest sites ship less to the browser, not more.
The fastest sites ship less to the browser, not more.

Color Contrast and Visual Performance

Color contrast requirements ensure that text is readable for people with low vision or color blindness. The WCAG (Web Content Accessibility Guidelines) require a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text. These requirements also improve readability for everyone, especially on mobile devices in bright sunlight or on low-quality displays.

The Performance Connection

High-contrast designs reduce the need for visual crutches that hurt performance:

  • Fewer background images needed. When text has sufficient contrast against a solid background, you don’t need textured or gradient background images to make it readable.
  • Simpler CSS. Text shadows, glow effects, and outline techniques used to compensate for low contrast add rendering complexity. High-contrast text needs none of these.
  • Better compression. High-contrast, visually simple designs compress more efficiently than designs with subtle gradients and transparency effects.

Testing Color Contrast

  • Chrome DevTools shows contrast ratios when inspecting text elements
  • WebAIM Contrast Checker (webaim.org/resources/contrastchecker) lets you test specific color combinations
  • Lighthouse flags contrast issues as part of its accessibility audit
  • axe DevTools browser extension provides detailed contrast reports

Fix contrast issues during design, not after development. Changing colors in development often requires design approval cycles that delay launches.

Keyboard Navigation and Reduced JavaScript

Keyboard navigation is essential for users who can’t use a mouse, including people with motor disabilities, screen reader users, and power users who prefer keyboard shortcuts. Sites that support full keyboard navigation are also sites that work with less JavaScript.

Native Keyboard Support

HTML provides keyboard support for free when you use the right elements:

Links (<a>)
Focusable and activated with Enter
Buttons (<button>)
Focusable and activated with Enter or Space
Form inputs
Focusable and interactive via keyboard
Select menus
Navigable with arrow keys
Details/summary
Expandable with Enter or Space

When you replace these elements with divs and custom JavaScript, you lose the native keyboard support and must rebuild it manually. That’s more JavaScript to download, parse, and execute, directly impacting performance.

Focus Management

Visible focus indicators tell keyboard users where they are on the page. The default browser focus ring works, but many designers remove it with outline: none because it appears during mouse clicks too. This is an accessibility violation.

The better approach uses the :focus-visible CSS pseudo-class, which shows focus indicators only when the user is navigating with a keyboard, not when clicking with a mouse. This is a CSS-only solution that requires no JavaScript:

css
:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

This single CSS rule replaces JavaScript-based focus management libraries that some sites load, improving both accessibility and performance.

Skip Navigation Links

A “Skip to main content” link at the top of the page lets keyboard and screen reader users bypass the navigation menu. This is one of the most common accessibility requirements and it’s pure HTML. No JavaScript, no performance cost:

html
<a href="#main-content" class="skip-link">Skip to main content</a>

The skip link is visually hidden until focused, then appears at the top of the viewport. It’s a few lines of HTML and CSS that dramatically improve the keyboard experience.

Screen Readers and Content Structure

Screen readers convert visual content into audio or braille output. They rely entirely on the document’s structure and semantics to create a useful experience. Sites built with good structure for screen readers also have clear, parseable structure for search engines and fast rendering for browsers.

Heading Hierarchy

Screen reader users often navigate by headings. A proper heading hierarchy (H1, H2, H3 in order without skipping levels) creates a table of contents for the page. This same hierarchy helps search engines understand your content structure, improving SEO.

A clear heading hierarchy also tends to produce shorter, better-organized content that loads faster because it avoids the bloat of poorly structured pages with everything crammed into visual sections rather than semantic sections.

Image Alt Text

Every meaningful image needs descriptive alt text. Decorative images should have empty alt attributes (alt=""). This is fundamental accessibility, and it also has performance implications.

When you audit images for alt text, you often discover:

  • Decorative images that should be CSS backgrounds. Moving them from HTML <img> elements to CSS eliminates them from the document flow and allows them to be lazy-loaded or eliminated on mobile.
  • Images that are redundant. Some images don’t add information and can be removed entirely, saving bandwidth.
  • Images carrying text. Text in images can’t be read by screen readers. Replacing them with HTML text improves accessibility, SEO, and often reduces page weight.

Link Text

Screen reader users often navigate by pulling up a list of all links on the page. Links that say “click here” or “read more” are meaningless out of context. Descriptive link text like “view our roof repair services” or “read our guide to kitchen remodeling” provides context for both screen readers and search engines.

Descriptive link text also reduces the need for surrounding explanatory content, making pages leaner.

How Accessibility Improves Core Web Vitals

The overlap between accessibility compliance and Core Web Vitals performance is striking.

Largest Contentful Paint (LCP)

  • Semantic HTML with less JavaScript renders faster, improving LCP
  • Properly structured images with alt text are more likely to be correctly sized and optimized
  • Reduced reliance on heavy JavaScript frameworks means less render-blocking content

Cumulative Layout Shift (CLS)

  • Properly sized images with dimensions (required for accessibility) prevent layout shift
  • Semantic form elements maintain consistent sizing without JavaScript-driven resizing
  • Accessible designs avoid dynamic content injection that causes layout shifts

Interaction to Next Paint (INP)

  • Native HTML elements respond to interaction faster than JavaScript-powered custom elements
  • Keyboard-accessible interfaces are designed to respond instantly to input
  • Reduced JavaScript means less main thread blocking, faster interaction response

Building an Accessibility-First Workflow

Making accessibility an afterthought is expensive. Retrofitting an inaccessible site requires auditing every page, rewriting HTML, adding ARIA, and testing across assistive technologies. Building with accessibility from the start is faster, cheaper, and produces better-performing sites.

During Design

  • Choose a color palette that meets WCAG contrast ratios
  • Design focus states for all interactive elements
  • Plan heading hierarchy and page structure
  • Design for different viewport sizes and zoom levels
  • Avoid designs that rely on color alone to convey information

During Development

  • Write semantic HTML first, then style it
  • Test keyboard navigation as you build each component
  • Add alt text to images as they’re implemented
  • Use landmark elements (header, nav, main, footer) for page regions
  • Test with a screen reader periodically, not just at the end

During Testing

  • Run Lighthouse accessibility audit
  • Run axe DevTools scan
  • Test complete keyboard navigation flow
  • Test with at least one screen reader (VoiceOver on Mac, NVDA on Windows)
  • Verify focus management in modals, menus, and dynamic content

Automated vs. Manual Testing

Automated tools catch about 30-40% of accessibility issues. They’re excellent at finding missing alt text, contrast violations, missing form labels, and incorrect ARIA. But they can’t evaluate whether alt text is meaningful, whether keyboard navigation makes logical sense, or whether the reading order of content is correct.

Manual testing with a screen reader and keyboard is essential for the other 60-70%. Budget time for both automated and manual testing in every project.

Legal and Business Considerations

Web accessibility isn’t just good practice. It’s increasingly a legal requirement. ADA lawsuits against businesses with inaccessible websites have increased every year. While the legal landscape varies, the trend is clear: accessibility is becoming an expectation, not a bonus.

Beyond legal risk, accessible websites serve a larger audience. Approximately 26% of adults in the United States have some type of disability. Permanent disabilities, temporary injuries, and situational limitations (bright sunlight, noisy environments, one hand occupied) all affect how people interact with your site. Accessibility improvements help all of these users.

Accessible and fast is exactly how we build. Our Hot Dog Business Growth case study shows a hand-coded rebuild that delivers both.

About the Author

Brian Hunter is the founder of Hunter Creative Media & Design, an Aurora, IL studio building hand-coded websites and custom web applications for small businesses across Chicago’s western suburbs. He writes about web performance, local SEO, and the software that runs small businesses. Get in touch.

Keep Reading