Web Content Accessibility

These accessibility standards and best practices make digital experiences everyone can use.

Design & Structure

Tab/Accordion Items

What did you see first on this page? The big bold text? Those are headings!

Why It Matters

Headings let people with sight skim the content. People who use screen readers can skim headings too when they're coded as headings.

Best Practices

Your design should flex.  

Why It Matters

Users like to zoom in to see things better. On the web, most users have small screens.

Best Practices

Font style choices make or break readability.

Why It Matters

When text is hard to read, users complain or leave.

Best Practices

  • Text must have good contrast.
  • Font size is up to you. WCAG provides no minimum size requirement.
  • Users like to zoom in. Text must be resizable up to 200%.
  • Sans-serif fonts are easy to read.

 

Measure your text contrast.

Why It Matters

When text contrast is too low, it's hard or impossible to read, especially for a person with low vision.

Best Practices

  • Test your text contrast using a contrast checker.
  • Most text must be at least 4.5:1 with its background.
  • Large text must be at least 3:1.

Visibility is usability.

Why it Matters

Informational graphics need good contrast so that people with low vision can see them.

Best Practices

  • Graphical objects must have a contrast of at least 3:1 with adjacent content (with some exceptions).

Not everyone can see all colors. 

Why It Matters

If color shows meaning, show it another way too.

Best Practices

Smart decisions start with data.

Why It Matters

A person who uses assistive technology wants to see and compare data. Build it wrong and the meaning is gone.

Best Practices

🚨 Your design can cause physical harm.

Why It Matters

Flashing can trigger epileptic seizures to some people.

Best Practices

  • Don't let things flash.
  • If things must flash, it must follow this rule.
  • Users must be able to pause, stop, or hide animations that last for more than 5 seconds.
  • Keep animations subtle.

Interaction

Tab/Accordion Items

Test with a keyboard.

Why It Matters

Not everyone uses a mouse.

Best Practices

Developer Tips

An accessible form is a huge win for everyone.

Why It Matters

When forms aren't accessible, people can't get the services they need.

Best Practices

Visibility is usability.

Why It Matters

People can't see controls that have low contrast.

Best Practices

  • Controls must have a contrast of at least 3:1 with adjacent colors.
  • Disabled/inactive controls don't have a contrast requirement.

Keep everyone in the loop.

Why It Matters

When things appear on screen, users who can't see want to know about it.

Best Practices

Some users need more time.

Why It Matters

If there is a session timeout, let users know before time expires so that they can ask for more time.

Best Practices

  • Give users at least 20 seconds to respond to a timeout warning message so they can extend their time.
     

Content & Media

Tab/Accordion Items

Get to the good stuff fast

Why It Matters

Navigation should get users to where they want to go. Quickly.

Best Practices

Users want to understand your instructions the first time.

Why It Matters

A person with a disability might do a task a differently.

Best Practices

  • Describe controls by name, not just by how they look or where they are.
  • People who are blind or have low vision need non-visual instructions.
  • "Click" is an instruction for mouse users. Words like "activate", "select", or "press" work for anyone.
  • Use plain language: Clear, concise, and well organized instructions.

Some images provide info.

Why It Matters

People who can't see an image want to understand its meaning.

Images that provide information visually, need alt text.

Best Practices

  • Try to keep alt text short. Don't say "image of".
  • Don't use images of text when you can just use text.
  • If there's text on the image, put it in the alt text.
  • For complex images (charts, infographics), provide the details another way - a list or data table.

Some images are decorative.

Why It Matters

People who can't see want to ignore images that are decorative. If they aren't coded as decorative, they get in the way.

Best Practices

Show. And tell.

Why It Matters

People who can't see want to understand the data.

Best Practices

  • Label things. Use text.
  • Can a colorblind person understand it?
  • Test it with a keyboard.
  • Provide a table with the data.

Go Deeper

People want info in a way that works for them.

Why It Matters

  • People that can't see, want to read or hear the info in the video.
  • People that can't hear, want to read captions or a transcript.

Best Practices

People that can't hear, want to read.

Why it Matters

Information in audio format isn't accessible to people who can't hear.

Best Practices

Make documents accessible.

Why It Matters

Documents should work for everyone.

Best Practices

  • Test documents against WCAG.
  • PDFs need tags for people using assistive tech.
  • Word, Power Point, and Excel documents need to be accessible.

Let screen readers say it right.

Why It Matters

A screen reader can pronounce other languages correctly when the page is coded correctly.

Best Practices

Development

Tab/Accordion Items

Choose the right HTML tag. Always.

Why It Matters

People who can't see need to know what things are.

Go Deeper

Some HTML tags provide semantics. Screen readers speak the semantics to the user.

  • Semantics describe what content is, not just how it looks.
  • The <h1> tag makes a screen reader say "heading level 1".
  • The <button> tag makes a screen reader say "button".
  • The <div> tag makes a screen reader say nothing extra.
  • Using a <div> to create a button makes no sense and won't be accessible without a lot of extra work.

Developer Tips

  • Choose the right HTML tag.
  • Use native HTML instead of ARIA when possible.

Things go with other things.

Why It Matters

A user who doesn't see may not know when two things go together.

Go Deeper

A programmatic association connects things together in code.

Example 1: A text box with an associated label

  • <label for="x1">Name</label>
    <input type="text" id="x1">
  • Label's for attribute references the textbox id, programmatically associating the elements.

Example 2: Radio buttons within a fieldset under a legend.

  • <fieldset>
    <legend>Do you agree?</legend>
    <label><input type="radio">Yes</label>
    <label><input type="radio">No</label>
    </fieldset>
  • The radio buttons, inside the fieldset, are programmatically associated to the legend. They are also (implicitly) associated to their labels.

Developer Tips

 

Manage focus as content changes.

Why It Matters

As things show and hide, users of assistive tech need you to guide them.

Go Deeper

When interactive content appears, it's usually the right thing to send focus to it. Users probably want to use it right away.

Developer Tips

Never Do This

  • Don't tediously manage the general keyboard tab order with JavaScript focus() or tabindex greater than zero. Let the code order control the tab order.

Screen readers can speak without moving focus.

Why It Matters

Screen reader users need to hear status messages without the system focus moving.

  • A status message is a short update that tells users something changed on the screen.

Go Deeper

ARIA live regions make screen readers announce status messages.

  • A live region is a container for status messages.
  • Screen readers constantly monitor live regions for content changes. When a change is detected, the content is announced.

Developer Tips

  • The aria-live attribute creates a live region.
  • To make the screen reader announce something, change the live region's text content using JavaScript.
  • Certain roles (role=alert) can also create live regions.

ARIA is for experts.

Why It Matters

When ARIA is coded wrong, accessibility gets worse.

Go Deeper

ARIA helps assistive tech understand custom, complex components. 

ARIA can do powerful things that HTML cannot:

Developer Tips

  • You don't have to use ARIA. Use native HTML when possible.
  • Know what you're doing when you use ARIA. Consult the ARIA spec or an expert.

 

Let users read better.

Why It Matters

Browser extensions and bookmarklets let users change text spacing to make it easier to read.

Go Deeper

Changing some specific text style properties should not break the page layout; things should reflow and flex.

People that like to increase text spacing:

  • A person with dyslexia
  • A person with low vision
  • A person with a cognitive disability

Developer Tips

Give users time to read new content.

Why It Matters

Content that appears on hover or keyboard focus shouldn't disappear or get in the way.

Go Deeper

Users want to control non-persistent content at their own pace. And dismiss it when they're ready.

Non-persistent controls: Temporary content that appears on hover or keyboard focus.

  • Tooltips
  • Dropdown Menus
  • Pop-ups
  • Popovers

Unpredictable temporary content can be difficult to use and disruptive for some people:

  • A person with a motor disability
  • A person with a cognitive disability
  • A keyboard user

Developer Tips

Provide simple pointer alternatives.

Why It Matters

Some people can't do complex pointer gestures. People click things by mistake.

Go Deeper

A complex pointer gesture is a multipoint or path-based gesture. Examples:

  • Click, drag, drop
  • Tap, slide, release
  • Pinch to zoom
  • Twist / Rotate
  • Two Finger Scroll
  • Three Finger Swipe

A simple pointer operation is a basic click or tap without a making path. Examples:

  • Click a button.

People click/tap things accidentally. Users need a way to cancel the click/tap.

Developer Tips

Don't force orientation and motion controls.

Why It Matters

Users may not be able to rotate or move their device because it's fixed to a wheelchair.

Developer Tips

  • If device motion controls page content, provide another way or let the user turn motion off.
  • Don't lock content to portrait or landscape orientation.
On This Page Jump Links
Off