Skip to content

Accessibility Checker

✨ Checks as you type 0 lines · 0 B

    Paste HTML or click Sample

    Accessibility problems will show up here, with how to fix each one

    HTML Accessibility Checker: Find a11y Problems in Your HTML

    Paste your HTML and this checker lists the accessibility problems it can find: images with no alt text, form fields with no label, links that say “click here”, headings that skip a level, low contrast and more. Each one comes with the line it’s on, the WCAG rule it breaks, and how to fix it in plain English. It all runs in your browser, so your code isn’t uploaded anywhere.

    What is web accessibility?

    Web accessibility (often written “a11y”, because there are 11 letters between the a and the y) means people can use your site whatever their abilities. That includes someone who is blind and listens to the page with a screen reader, someone who can’t use a mouse and gets around with the keyboard, someone with low vision who zooms in to 200%, and someone who is deaf and needs captions on a video. It also helps everybody else: captions in a noisy train, big tap targets on a small phone, readable text in bright sun.

    The rules most people follow are the WCAG (Web Content Accessibility Guidelines) from the W3C. They’re built around four ideas, known as POUR:

    Each rule has a number (like 1.1.1 Non-text Content) and a level: A, AA or AAA. Most laws and company policies ask for level AA. The checker shows the rule number on every problem it finds.

    What this checker can find, and what it can’t

    ✅ What it finds

    • Missing things: alt text, labels, a page title, a language, names on buttons and links.
    • Mistakes in the code: a skipped heading level, ARIA roles that don’t exist, ids used twice, aria-hidden on a link.
    • Things that block people: zoom turned off, sound that plays on its own, removed focus outlines.
    • Low contrast, when both colors are set in your code.

    🙈 What it can’t judge

    • Whether your alt text actually describes the picture. Only you know that.
    • Whether the tab order makes sense, or a custom menu works with the keyboard.
    • Anything your JavaScript adds or changes after the page loads.
    • Colors from external style sheets, images behind text, or styles for other screen sizes.
    • Whether your words are clear and your error messages are helpful.

    Automatic checks catch a part of the problems, not all of them. They’re a great first pass because they’re fast and never get tired. After that, spend ten minutes testing with a keyboard and a screen reader.

    How to use it

    Step 1 Paste or open your HTML

    Paste your code on the left, open an .html file, or drag one onto the editor. Click Sample to try a small coffee shop page with 7 errors, 5 warnings and 2 tips hidden in it. The results update a moment after you stop typing.

    💡 Checking a live site? Open it, press Ctrl+U (Cmd+Option+U on a Mac) to see the source, and paste that here.

    Step 2 Work through the issues

    Each issue shows a red error, amber warning or blue tip badge, the line, the WCAG rule, why it matters and how to fix it, plus the tag it found. Click an issue to select that line in the editor. Use the filter to look at errors first.

    Step 3 See it in the preview

    Click Show in preview on an issue and the Preview tab outlines that element in red, so you can see which image or button it means. Scripts are always off in the preview.

    Step 4 Copy the report

    Copy report copies the whole list as plain text, ready for a ticket, a pull request or a message to your team.

    The most common problems and how to fix them

    These come up on almost every site. Each fix is small.

    Images without alt text

    WCAG 1.1.1 Non-text Content

    A screen reader can’t see the picture. With no alt, it often reads out the file name (“IMG underscore 4 0 2 1 dot jpeg”). Say what the image shows, or what it does if it’s a link or button. For a purely decorative image, use an empty alt="" so it gets skipped.

    ❌ Before:

    <img src="team.jpg">
    <img src="divider.png" alt="divider.png">

    ✅ After:

    <img src="team.jpg" alt="Our five baristas behind the counter">
    <img src="divider.png" alt="">

    💡 Skip “image of” or “picture of”. Screen readers already say “image” first.

    Form fields without a label

    WCAG 1.3.1 Info and Relationships, 4.1.2 Name, Role, Value

    Without a label, a screen reader says just “edit text”. A placeholder isn’t a label: it vanishes as soon as you type. Tie a <label> to the field with for and id, or wrap the field in the label. Clicking the label then also puts the cursor in the field, which helps on phones.

    ❌ Before:

    <input type="email" placeholder="Email">

    ✅ After:

    <label for="email">Email</label>
    <input type="email" id="email" placeholder="[email protected]">

    Icon buttons and links with no name

    WCAG 4.1.2 Name, Role, Value

    An icon means something to people who can see it. A screen reader just says “button” or “link”. Give it a name with aria-label (or visually hidden text), and hide the icon itself from screen readers.

    ❌ Before:

    <button class="close">
      <svg viewBox="0 0 20 20"><path d="M4 4l12 12M16 4L4 16"/></svg>
    </button>

    ✅ After:

    <button class="close" aria-label="Close">
      <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4 4l12 12M16 4L4 16"/></svg>
    </button>

    Headings that skip a level

    WCAG 1.3.1 Info and Relationships

    Headings are the table of contents for screen reader users, who jump from one to the next. Going from <h1> straight to <h3> makes it look like a section is missing. Pick the heading by its place in the outline, then style its size with CSS.

    ❌ Before:

    <h1>Bean There Coffee</h1>
    <h3>Today's specials</h3>

    ✅ After:

    <h1>Bean There Coffee</h1>
    <h2>Today's specials</h2>

    No page language or title

    WCAG 3.1.1 Language of Page, 2.4.2 Page Titled

    The lang attribute tells a screen reader which voice and pronunciation to use. The <title> is the first thing it reads when the page opens, and the name of the browser tab.

    ❌ Before:

    <html>
    <head>
      <meta charset="utf-8">
    </head>

    ✅ After:

    <html lang="en">
    <head>
      <meta charset="utf-8">
      <title>Menu - Bean There Coffee</title>
    </head>

    Low color contrast

    WCAG 1.4.3 Contrast (Minimum)

    Light gray text on white looks clean, but it’s hard to read for people with low vision, older eyes, or anyone on a phone in the sun. Normal text needs a contrast ratio of at least 4.5:1, large text 3:1.

    ❌ Before:

    <p style="color: #a3a3a3; background: #ffffff">Open 7am to 6pm</p>

    ✅ After:

    <p style="color: #525252; background: #ffffff">Open 7am to 6pm</p>

    💡 #a3a3a3 on white is 2.52:1. #525252 on white is 7.81:1, which even passes the stricter AAA level.

    Things you can only click with a mouse

    WCAG 2.1.1 Keyboard, 2.4.7 Focus Visible

    A <div> with onclick can’t be reached with Tab, and Enter does nothing on it. A <button> works with the keyboard for free. And don’t remove the focus outline: it’s how keyboard users see where they are.

    ❌ Before:

    <div class="card" onclick="openMenu()">Menu</div>
    <style> a:focus { outline: none; } </style>

    ✅ After:

    <button type="button" class="card" onclick="openMenu()">Menu</button>
    <style> a:focus-visible { outline: 3px solid #2563eb; } </style>

    Test with a keyboard and a screen reader

    This is where you find the problems no checker can. You don’t need to be an expert. Ten minutes on your most important page teaches you a lot.

    ⌨️ Keyboard only

    1. Put your mouse away and click in the address bar.
    2. Press Tab to move forward and Shift+Tab to go back.
    3. Can you always see where you are? There should be a clear outline on each link and button.
    4. Does the focus move in a sensible order, top to bottom, left to right?
    5. Can you open menus, press buttons (Enter or Space) and close pop-ups (Esc)?
    6. Do you ever get stuck somewhere you can’t Tab out of?

    🔊 Screen reader

    • Windows: NVDA is free. Press H to jump between headings, K for links, F for form fields.
    • Mac and iPhone: VoiceOver is built in. Turn it on with Cmd+F5, or in Settings on the phone.
    • Android: TalkBack is built in, under Settings, Accessibility.

    Listen for images that are read as file names, fields that are read as just “edit text”, and buttons that are read as just “button”. Those are the ones to fix first.

    Everything it checks

    The rules are careful on purpose: when the checker can’t be sure from the code alone, it gives a warning or a tip instead of an error.

    Accessibility checks and their WCAG rules
    CheckLevelWCAG
    Images with no alt, or alt that is a file name, “image” or “image of…” Error / warning / tip 1.1.1
    Image buttons, image map areas and role="img" with no text alternative Error 1.1.1
    Inputs, selects and textareas with no label (a placeholder doesn’t count) Error 1.3.1, 4.1.2
    <label for> pointing to an id that doesn’t exist Warning 1.3.1
    Radio buttons not grouped in a fieldset Tip 1.3.1
    Buttons and links with no name (empty or icon only) Error 2.4.4, 4.1.2
    Vague link text: “click here”, “read more”, “here” Warning 2.4.4
    Links that open a new tab without saying so Tip 3.2.5
    onclick on a <div>, <span> or an <a> without href Warning 2.1.1
    Skipped heading levels, empty headings, no <h1>, more than one <h1> Warning / tip 1.3.1, 2.4.6
    Missing or invalid <html lang>, missing <title>, no <main> Error / warning / tip 3.1.1, 2.4.2, 1.3.1
    Tables with no header cells or caption, and layout tables Tip 1.3.1
    <li> outside a list Warning 1.3.1
    Duplicate ids, and aria-labelledby / aria-describedby pointing to missing ids Error / warning 4.1.2, 1.3.1
    Unknown ARIA roles and aria-* attributes, and aria-* used on the wrong role Error / warning 4.1.2
    aria-hidden="true" on something you can Tab to Error 4.1.2
    tabindex greater than 0 Warning 2.4.3
    Audio and video that play sound on their own, videos with no captions track Error / warning / tip 1.4.2, 2.2.2, 1.2.2
    <marquee> and <blink> Error 2.2.2
    iframes with no title Error 4.1.2
    Viewport that blocks zoom (user-scalable=no, maximum-scale under 2) Error 1.4.4
    Timed page refresh or redirect Warning 2.2.1
    :focus rules that remove the outline with nothing in its place Warning 2.4.7
    Text contrast, when the colors are set in your code Error 1.4.3

    Related tools

    Frequently Asked Questions

    If the checker finds nothing, is my page accessible?

    Not for sure, and no automatic tool can tell you that. A checker can see that an image has alt text, but not whether the text actually describes the picture. It can’t tell if the tab order makes sense, if a custom menu works with the keyboard, or if an error message is clear. Use the checker to catch the easy mistakes fast, then try the page with only a keyboard and with a screen reader.

    What is WCAG?

    WCAG stands for Web Content Accessibility Guidelines. It’s the list of rules from the W3C that most accessibility laws and policies point to. Each rule has a number, like 1.1.1 Non-text Content (images need a text alternative), and a level: A, AA or AAA. Most sites aim for level AA. Every problem in this checker shows the WCAG rule it’s about.

    What’s the difference between errors, warnings and tips?

    Errors are clear failures that block people, like an image with no alt text or a form field with no label. Warnings are very likely problems, but the checker can’t be sure from the code alone, like link text that says “click here”. Tips are good practice that helps a lot of people, like grouping radio buttons in a fieldset. Fix the errors first.

    Does it check color contrast?

    Partly. When your code sets both the text color and the background color behind it (in a style attribute or a simple CSS rule like .note or p.note), it works out the contrast ratio and flags anything under 4.5:1 for normal text or 3:1 for large text. If a rule it can’t be sure about might change those colors, like .card p, a :hover style, an @media block or !important, it skips that text rather than guess. It also can’t see colors from external style sheets or images behind text. For two colors you already know, use the Color Contrast Checker.

    Is my HTML uploaded anywhere?

    No. The checks run in your browser, so your code never leaves your computer. The Preview tab shows your HTML in a locked-down frame with scripts turned off.

    Can I check a live website by its URL?

    Not directly. Open the page in your browser, press Ctrl+U (or Cmd+Option+U on a Mac) to see its source, then copy and paste it here. Keep in mind that pages built by JavaScript may look different from their source, so the checker only sees what’s in the HTML you paste.

    Why is a placeholder not enough as a label?

    The placeholder disappears as soon as someone starts typing, so they can’t check what the field was for. Its light gray text is often hard to read, and some screen readers don’t read it at all. Use a real <label> and keep the placeholder for an example, like placeholder="[email protected]".

    Should I add ARIA to fix these problems?

    Usually not. Native HTML elements already come with the right role and keyboard support: a <button> works with Enter and Space, a <label> names its field, <nav> marks the menu. Reach for ARIA only when no HTML element does the job. Wrong ARIA is worse than none, which is why the checker flags unknown roles, misspelled aria-* attributes and aria-hidden on things you can still Tab to.