1.1.1 Non-Text Content
Every image, icon, or other non-text element must include a text description that conveys the same information or function.
Resolving Missing Presentational Roles on Decorative Content
Adding the “presentation” or “none” role for your decorative non-text content allows assistive technologies, such as screen readers, to skip unnecessary content and concentrate on reading what is meaningful.
In the HTML code, locate the decorative non-text content (e.g.,
<img>used as a border,<object>used for styling only,<area>used for visual effects).Within the element, add the attribute
role="presentation".
Note: If your element already has a role attribute, replace it withrole="presentation".
Example
<!-- Incorrect -->
<area shape="rect" coords="34,44,270,350" href="#">
<!-- Correct -->
<area shape="rect" coords="34,44,270,350" href="#" role="presentation">Resolving Missing Alt Attributes on Non-Text Content
All non-text content, such as images, videos, and buttons, should include alternative text that provides descriptive identification of the content.
In your HTML code, locate the non-text content elements (e.g.,
<img>,<object>,<area>) that are missing analtattribute.Add an
altattribute to the element.Enter a descriptive alternative description in the
altattribute that conveys its meaning.
Note: For decorative images, usealt=""(empty alt text) to indicate the image does not convey meaningful content.
Example
<!-- Incorrect -->
<img src="logo.png">
<!-- Correct -->
<img src="logo.png" alt="Logo of Company A with a stylized tree design">Resolving Missing Alt Text for Image Buttons
Image buttons need descriptive alt text to ensure that users with visual impairments understand the purpose of the button when navigating the page.
In your HTML code, locate the
<img>element within a<button>or<input>element.Within the
<img>element, locate thealtattribute.Add a clear and concise description of the button's function within the
altattribute.
Example
<-- Incorrect -->
<button><img src="submit-button.png" alt=""></button>
<-- Correct -->
<button><img src="submit-button.png" alt="Submit form"></button>Resolving Missing Aria-labelledby Attribute Issues
Using the aria-labelledby attribute ensures that assistive technology, such as screen readers, can correctly read content labels, helping users better understand the context of the element.
In your HTML code, locate the element that needs to be labelled (e.g.,
<img>,<object>,<area>).Within the element, add the attribute
aria-labelledby.Within the
aria-labelledbyattribute, enter a label name that provides a description for the element.
Note: The label name should convey the same meaning as the label of the corresponding element that describes the image's content.
Example
<!-- Incorrect -->
<img src="chart.png" aria-labelledby="nonexistentLabel">
<!-- Correct -->
<img src="chart.png" aria-labelledby="chartTitle">
<h2 id="chartTitle">Sales Data Chart</h2>Resolving Missing Title Issues
Using the title attribute ensures that assistive technology, such as screen readers, can read content with a proper title.
In your HTML code, locate the element that needs to be labelled (e.g.,
<img>,<object>).Within the element, add the
titleattribute.Within the
titleattribute, enter a descriptive title for your element.
Example
<!-- Incorrect -->
<object data="document.pdf" type="application/pdf"></object>
<!-- Correct -->
<object data="document.pdf" type="application/pdf" title="Annual Financial Report 2023"></object>Resolving Missing Accessible Names for Meaning Graphics
Adding accessible names to SVG elements provides a text alternative for the visual content, ensuring that users who rely on screen readers or other assistive technologies can understand the content.
In the HTML code, locate the
<svg>element.Within the
<svg>element, add thearia-labelattribute.Within the
aria-labelattribute, enter a descriptive label for your graphic.
Example
<!-- Incorrect -->
<svg width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>
<!-- Correct -->
<svg width="100" height="100" aria-label="Red circle representing a stop sign">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg> Resolving Missing Accessible Names for Decorative Graphics
Adding the presentation role for your decorative graphics ensures that assistive technologies, such as screen readers, can skip unnecessary content and concentrate on reading what is meaningful.
In the HTML code, locate the
<svg>element.Within the
<svg>element, add therole="presentation"attribute.
Example
<!-- Incorrect -->
<svg width="100" height="100">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>
<!-- Correct -->
<svg width="100" height="100" role="presentation">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>Resolving Non-Descriptive Alt Text in Images
All non-text content, such as images, videos, and buttons, should include alternative text that provides descriptive identification of the content.
In the HTML code, locate the
<img>element.Within the
<img>element, locate thealtattribute.Replace the existing description with a more descriptive phrase that conveys the image’s purpose or content.
Note: If the image is decorative and conveys no meaningful information, replace your current attribute description withalt=""orrole="presentation"to hide it from screen readers.
Example
<!-- Incorrect -->
<img src="company-logo.png" alt="Logo">
<!-- Correct -->
<img src="company-logo.png" alt="White House logo, representing the official symbol">
1.2.1 Audio-only and Video-only (Prerecorded)
Any prerecorded audio or video without visuals or sound must include a text transcript that provides the same information.
Resolving Missing Audio Transcript Issues
Providing a text transcript for audio content ensures that all users, including those who are deaf or hard of hearing, can access the same information.
In the HTML code, locate the
<audio>element.After the
<audio>element, add a<p>element.Within the
<p>element, enter the full transcript of the audio content in text form.
Example
<!-- Incorrect -->
<audio controls><source src="interview.mp3" type="audio/mpeg">Your browser does not support the audio element.</audio>
<!-- Correct -->
<audio src="interview.mp3" type="audio/mpeg" your="Your" browser="browser" does="does" not="not" support="support" the="the" audio="audio">
<p>Transcript: In this interview, Dr. Smith explains the importance of regular exercise. She discusses how physical activity can improve both mental and physical health, reduce the risk of chronic diseases, and enhance overall quality of life. She also shares tips for staying motivated and setting realistic fitness goals.</p>1.2.2 Captions (Prerecorded)
All prerecorded videos with sound must include captions that display the spoken words and important sounds on screen.
Resolving Missing Captions in Video Content
Providing captions for prerecorded videos ensures that users who are deaf or hard of hearing can still understand the content.
In the HTML code, locate the
<video>element.Inside the
<video>element, add a<track>element.-
In the
<track>element, add the following attributes:The
kindattribute to"captions"(e.g.,kind="captions")The
srcattribute to the file path of your caption file (e.g.,captions.vtt)The
srclangattribute to the appropriate language code (e.g.,en)The
labelattribute to describe the language of the video content (e.g.,"English")
Example
<!-- Incorrect -->
<video src="training-overview.mp4" controls>
</video>
<!-- Correct -->
<video src="training-overview.mp4" controls>
<track src="training-overview-en.vtt" kind="captions" srclang="en" label="English">
</video>
Resolving Missing Captions in Embedded Vimeo Videos
Captions must be available in Vimeo videos to ensure accessibility for users who are deaf or hard of hearing. Vimeo allows you to add captions through its video settings.
Open the video on vimeo.com.
Log in with the account that owns the video.
Go to Settings.
Select the Distribution tab, then open Subtitles (or Advanced > Subtitles in older layouts).
Find the Subtitles/CC section.
Upload a .vtt or .srt caption file.
Save your changes, then confirm captions are enabled by previewing the video.
Note: Captions will automatically display in the embedded <iframe> if enabled on Vimeo.
Resolving Missing Captions in Embedded YouTube Videos
YouTube videos must include captions so who are deaf or hard of hearing can access the spoken content. YouTube provides options for manual caption uploads or automatic captioning.
Open the video on youtube.com with the account that owns the video.
Go to YouTube Studio and select the video you want to edit.
Click on Subtitles in the left menu.
Choose the language for your captions.
-
Click Add and select one of the following:
Upload file (for .vtt or .srt files)
Auto-sync (paste the full transcript and let YouTube time it)
Type manually
Review and publish your captions.
1.3.1 Info and Relationships
Any information shown through layout, formatting, or visual structure must also be available in text or coded so that assistive technologies can understand it.
Resolving Missing ARIA Landmark Roles in Page Structure
Landmark roles help screen reader users understand the page layout and quickly navigate to key sections.
In your HTML code, locate structural elements (e.g.,
<div>,<section>,<form>).Add the appropriate ARIA landmark role using the
roleattribute (e.g.,role="main",role="navigation",role="form"). Learn more about the appropriate landmark role.
Note: Only add ARIA roles if the element does not already have a built-in landmark role (e.g.,<nav>already acts asnavigation).
Example
<!-- Incorrect -->
<div id="main-content">
<p>Welcome to our website.</p>
</div>
<!-- Correct -->
<div id="main-content" role="main">
<p>Welcome to our website.</p>
</div>
Resolving Improper ARIA Grouping for "group" Role
Proper use of ARIA roles helps screen readers understand the structure of the page, making it easier for users with disabilities to navigate and interact with the content.
In the HTML code, locate the element with
role="group".Within the element, include at least one interactive control element(e.g.,
<input>,<textarea>, or<select>).
Note: Learn more about which interactive control you should include. If there are no suitable interactive controls, consider replacingrole="group"with a more appropriate ARIA role or structure.
Example
<!-- Incorrect -->
<div role="group">
<p>This is a group with no interactive elements.</p>
</div>
<!-- Correct -->
<div role="group">
<label for="username">Username:</label>
<input id="username" type="text">
</div>
Resolving Improper ARIA Grouping for "radiogroup" Role
Proper use of ARIA roles helps screen readers understand the structure of the page, making it easier for users with disabilities to navigate and interact with the content.
In the HTML code, locate the element with
role="radiogroup".Within the element, include at least one radio button element (e.g.,
<input type="radio">orrole="radio").
Example
<!-- Incorrect -->
<div role="radiogroup">
<p>Select a delivery method:</p>
</div>
<!-- Correct -->
<div role="radiogroup" aria-label="Select a delivery method">
<label><input type="radio" name="delivery" value="standard"> Standard </label><br>
<label><input type="radio" name="delivery" value="express"> Express </label><br>
<label><input type="radio" name="delivery" value="overnight"> Overnight</label>
</div>
Resolving Improper ARIA Grouping for "checkbox" Role
Proper use of ARIA roles helps screen readers understand the structure of the page, making it easier for users with disabilities to navigate and interact with the content.
In the HTML code, locate
<input type="checkbox">or an element withrole="checkbox".Wrap the checkboxes in a container and assign it the
role="group".Add an
aria-labelledbyoraria-labelattribute to the element withrole="checkbox"to describe the purpose of the checkbox group.
Example
<!-- Incorrect -->
<div><label><input type="checkbox" id="news"> Newsletter</label><br>
<label><input type="checkbox" id="updates"> Product Updates</label><br>
<label><input type="checkbox" id="offers"> Special Offers</label>
</div>
<!-- Correct -->
<div role="group" aria-labelledby="emailPref">
<p id="emailPrefsLabel">Which types of emails would you like to receive?</p>
<label><input type="checkbox" id="news"> Newsletter</label><br>
<label><input type="checkbox" id="updates"> Product Updates</label><br>
<label><input type="checkbox" id="offers"> Special Offers</label>
</div>
Resolving Improper ARIA Grouping for "radio" Role
Proper use of ARIA roles helps screen readers understand the structure of the page, making it easier for users with disabilities to navigate and interact with the content.
In the HTML code, locate
<input type="radio">or an element withrole="radio".Group the radio buttons inside the element with the
role="radiogroup".Add an
aria-labelledbyoraria-labelattribute to the element to describe the purpose of the radio group.
Example
<!-- Incorrect -->
<label><input type="radio" name="contact"> Email</label><br>
<label><input type="radio" name="contact"> Phone</label><br>
<label><input type="radio" name="contact"> Text Message</label>
</div>
<!-- Correct -->
<div role="radiogroup" aria-labelledby="contactMethod">
<p id="contactMethodLabel">How would you like us to contact you?</p>
<label><input type="radio" name="contact"> Email</label><br>
<label><input type="radio" name="contact"> Phone</label><br>
<label><input type="radio" name="contact"> Text Message</label>
</div>
Resolving Missing Aria-Level on Heading Roles
ARIA heading roles must include a defined heading level for clarity.
In the HTML code, locate the element with the attribute
role="heading".After the
roleattribute, add thearia-levelattribute with a value from 1 to 6 (e.g.,aria-level="2").
Example
<!-- Incorrect -->
<div role="heading">Subsection Title</div>
<!-- Correct -->
<div role="heading" aria-level="2">Subsection Title</div>
Resolving Missing Table Headers
Table headers help screen readers understand what each column or row means. If a table does not have headers, assistive technologies cannot give users the right context.
In your HTML code, locate the
<table>element and identify the first row. This row should define the table's headings (e.g., "Name," "Age," etc.).If the first row uses
<td>(table data) elements, change each<td>to a<th>(table header) to indicate that these cells are headers.Add
scope="col"to each<th>element if it’s a column header, orscope="row"if it’s a row header.
Example
<!-- Incorrect -->
<table>
<tr>
<td>Name</td>
<td>Age</td>
</tr>
<tr>
<td>Ava</td>
<td>25</td>
</tr>
</table>
<!-- Correct -->
<table>
<tr>
<th scope="col">Name</th>
<th scope="col">Age</th>
</tr>
<tr>
<td>Ava</td>
<td>25</td>
</tr>
</table>
Resolving Missing Data Cell Associations in Lists
Lists used to present structured data should instead use a table so screen readers can clearly associate data with headings.
In the HTML code, locate the
<ul>and<ol>elements that present data with labels and values.Replace the
<ul>or<ol>structure with the<table>element.Add the
<th>elements for headers and<td>for values.Within
<th>, add thescope="col"attribute to indicate column headers.
Example
<!-- Incorrect -->
<ul>
<li><strong>Name:</strong> Ava</li>
<li><strong>Age:</strong> 25</li>
</ul>
<!-- Correct -->
<table>
<tr>
<th scope="col">Name</th>
<th scope="col">Age</th>
</tr>
<tr>
<td>Ava</td>
<td>25</td>
</tr>
</table>
Resolving Improper List Structure
Ensuring list items are placed inside a list element helps screen readers properly identify grouped content.
In the HTML code, locate the
<li>elements that are not wrapped in a<ul>or<ol>.Wrap the
<li>elements in a<ul>(for bullet points) or<ol>(for numbered list).
Example
<!-- Incorrect -->
<li>First item</li>
<li>Second item</li>
<!-- Correct -->
<ul>
<li>First item</li>
<li>Second item</li>
</ul>Resolving Missing Parent for Definition Elements
Definition terms and their descriptions must be placed inside a definition list to help screen readers properly identify definition content.
In the HTML code, locate the
<dt>or<dd>element.Wrap the
<dt>or<dd>element inside a<dl>container.
Example
<!-- Incorrect -->
<dt>HTML</dt>
<dd>A markup language</dd>
<!-- Correct -->
<dl>
<dt>HTML</dt>
<dd>A markup language</dd>
</dl>Resolving Missing Legend in Fieldset
Every <fieldset> should begin with a <legend> that describes what the grouped form fields are for. This helps users with screen readers understand the purpose of the group.
In the HTML code, locate the
<fieldset>element in your form.Add a
<legend>as the first element within the<fieldset>element.Write a brief, descriptive label inside the
<legend>to describe what the group form fields are for.
Example
<!-- Incorrect --> <fieldset><label for="name">Name:</label><input id="name" type="text"></fieldset>
<!-- Correct --> <fieldset><legend>Personal Information</legend><label for="name">Name:</label><input id="name" type="text"></fieldset>
1.3.4 Apple Mobile Web App Orientation
Resolving Apple Mobile Web App Orientation Issues
Locking a web app to portrait or landscape can make it difficult for some users to access content, especially those who rely on a particular device orientation. The apple-mobile-web-app-orientation meta tag should be set to allow any orientation.
-
In your HTML code, locate the
<meta>tag with the attributename="apple-mobile-web-app-orientation". -
Replace the value of the
content=”portrait”orcontent=”landscape”attribute withcontent=”any”. - Save your changes and reload the page.
Example
<meta name="apple-mobile-web-app-orientation" content="any">
1.3.4 Meta Viewpoint
Resolving Meta Viewport Orientation Issues
Viewport settings that lock the screen orientation or disable zoom can make it harder for users to read and interact with content. Allowing both portrait and landscape orientations, as well as zooming, gives users flexibility based on their device and personal needs.
-
In your HTML code, locate the
meta name="viewport"tag. -
Remove any attributes related to orientation restrictions, such as
orientation=portraitororientation=landscape. -
Remove any attributes that prevent zooming, such as
maximum-scale=1oruser-scalable=no. - Save your changes and reload the page.
Example
<!-- Incorrect -->
<meta name="viewport" content="width=device-width, maximum-scale=1, orientation=portrait">
<!-- Correct-->
<meta name="viewport" content="width=device-width">
1.3.4 CSS Orientation
Resolving CSS Orientation Issues
CSS media queries that lock content to portrait or landscape can limit how users interact with a page. Removing these restrictions allows the content to adapt in both orientations.
-
In your CSS code, locate media queries that restrict orientation, such
as:
-
@media screen and (orientation: portrait){ … } -
@media screen and (orientation: landscape) { … }
-
- Remove these orientation-specific media queries to allow the content to adapt freely to both orientations.
- Save your changes and reload the page.
Example:
<!-- Incorrect -->
@media screen and (orientation: portrait) {
.container {
width: 400px;
}
}
<!-- Correct-->
.container {
width: 400px;
1.3.5 Identify Input Purpose
Resolving Missing or Incorrect Autocomplete Attribute in Form Fields
Form fields need to clearly identify the type of information they expect. This helps browsers autofill data and supports users with cognitive or motor disabilities.
In your HTML code, locate each form field (e.g.,
<input>,<textarea>, or<select>) that collects the user data.Within each element, add or update the
autocompleteattribute with the correct value that matches the expected data (e.g.,"email","name","postal-code").
Note: Learn more about a full list of correct autocomplete attributes.
Example
<!-- Incorrect -->
<input type="text" name="full_name">
<!-- Correct-->
<input type="text" name="full_name" autocomplete="name"> 1.4.1 Use of Color
Resolving Missing Link Styling for Links
When color is the only way a link is styled, some users, such as those with color blindness, may not be able to distinguish it as a link. Adding additional styling, such as underlines or bold text, helps make links stand out clearly.
In your HTML code, locate the
<a>element.-
Add attributes in the
<a>element to include visual cues other than color, such as:text-decoration: underlinefont-weight: bold
border-bottom
Note: You can use CSS classes or external stylesheets to apply consistent styling across all links on your site.
Example
<!-- Incorrect -->
<a href="features.html" style="color: blue;">View Features</a>
<!-- Correct -->
<a href="features.html" style="color: blue; text-decoration: underline;">View Features</a>1.4.2 Audio Control
Resolving Missing Audio Controls in Audio Players
When audio plays automatically, users need a way to control playback. Adding audio controls allows users to pause, stop, or adjust the volume, which is important for accessibility and user experience.
In your HTML code, locate the
<audio>element.Add the
controlsattribute directly to the<audio>element to enable the built-in browser controls.
Note: Make sure the attribute is not empty and does not have a value.
Example
<!-- Incorrect -->
<audio src="welcome-message.mp3" autoplay></audio>
<!-- Correct -->
<audio src="welcome-message.mp3" autoplay controls></audio>
1.4.3 Contrast (Minimum)
Resolving Low Contrast Issues in Text
Low color contrast between text and background can make content difficult to read, especially for users with vision impairments. Improving contrast helps everyone access the content more easily.
In your HTML code, locate the element that contains text (e.g.,
p,h1,span,button).Check the current text color and background color using a color contrast tool, such as WebAIM Contrast Checker.
-
Make sure the contrast ratio meets the following:
At least 4.5:1 for regular text
At least 3.0:1 for large-scale text (18pt or 14pt bold)
If the contrast ratio is too low, adjust either the text color or the background color until you meet the minimum contrast ratio.
Example
<!-- Incorrect -->
<p style="color: #888; background-color: #fff;">Schedule a demo</p>
<!-- Correct -->
<p style="color: #000; background-color: #fff;">Schedule a demo</p>1.4.6 Contrast (Enhanced)
Text must have higher contrast against its background to make it easier to read for people with low vision.
Resolving Enhanced Contrast Issues in Text
Some users need a stronger contrast to read text comfortably. Enhanced contrast ensures text remains readable even in difficult visual conditions.
In your HTML code, locate the element containing text (e.g.,
h2,div,label,input, etc.).Check the contrast ratio between the text color and background using a contrast checking tool, such as WebAIM Contrast Checker.
-
Confirm the ratio meets the enhanced standards:
At least 7:1 for regular text
At least 4.5:1 for large-scale text (18pt or 14pt bold)
Adjust the colors as needed to meet these enhanced contrast levels.
Example
<!-- Incorrect -->
<h2 style="color: #aaa; background-color: #fff;">Explore Our Features</h2>
<!-- Correct -->
<h2 style="color: #000; background-color: #fff;">Explore Our Features</h2> demo</p>1.4.8 Visual Presentation
Resolving Insufficient Line Spacing in Paragraphs
Proper line and paragraph spacing improves readability, especially for users with dyslexia or low vision.
Locate the
<p>element in your HTML code.Within the CSS of the
<p>element, locate theline-heightCSS property and set it to at least 1.5 times the font size.
Note: You can do this using inline styles or a CSS class.Within the CSS of the
<p>element, locate themargin-bottomCSS property and set it to at least 1.5 times the line height (for example,1.5em).
Example
<!-- Incorrect -->
<p style="line-height: 1.2; margin-bottom: 0.8em;">This is a sample paragraph.</p>
<!-- Correct -->
<p style="line-height: 1.5; margin-bottom: 1.5em;">This is a sample paragraph.</p>
Resolving Justified Text Alignment in Paragraphs
Fully justified text can create uneven spacing between words, which makes it harder for some users to read, especially those with cognitive or visual disabilities.
In your HTML code, locate the
<p>element.Within the CSS of the
<p>element, check iftext-align: justify;is applied.Remove the
justifyvalue and set the alignment toleftinstead.
Note: You can also do this using inline styles or a CSS class.
Example
<!-- Incorrect -->
<p style="text-align: justify;">This is a sample paragraph.</p>
<!-- Correct -->
<p style="text-align: left;">This is a sample paragraph.</p>1.4.10 Reflow
Content must automatically adjust and rearrange itself to remain fully usable and readable on narrow screens as small as 320 pixels wide.
Resolving Viewport Restriction Issues
Setting the correct viewport properties helps content display properly on all screen sizes without requiring users to scroll horizontally.
In your HTML, go to the
<head>section of the page.Within the
<head>section, add the<meta name="viewport">tag.If a
<meta name="viewport">tag is already present but contains restrictive settings, update itscontentattribute tocontent="width=device-width, initial-scale=1".
Example
<!-- Incorrect -->
<meta name="viewport" content="width=500">
<!-- Correct -->
<meta name="viewport" content="width=device-width, initial-scale=1">1.4.11 Control Contrast
Resolving Controls with Low Contrast Issues
Low contrast on user interface components and graphics can make it difficult for users with low vision to identify and interact with them. Components such as buttons, inputs, and select menus must have a contrast ratio of at least 3:1 against adjacent colors.
- In your HTML code, locate the user interface component that was flagged, such as a
select,textarea, orinput. - Update the CSS styles of the component to ensure its border, background, and text colors have a contrast ratio of at least 3:1 with the adjacent colors.
Example:
<input type="text" style="border: 1px solid #333;">
1.4.12 Text Spacing
Content must stay easy to read and work properly when users increase spacing between letters, words, and lines to standard minimum sizes.
Resolving Inaccessible Letter Spacing
Accessible letter spacing helps users with visual or cognitive disabilities read text more comfortably.
In your HTML code, find the element with CSS that controls letter spacing (e.g.,
<span style="letter-spacing: 0.08em !important;">).Remove
!importantfrom theletter-spacingvalue if it’s used.Set the
letter-spacingvalue to at least0.12em.
Example:
<!-- Incorrect -->
<span style="letter-spacing: 0.08em !important;">Inaccessible letter spacing example.</span>
<!-- Correct -->
<span style="letter-spacing: 0.12em;">Accessible letter spacing example.</span>Resolving Inaccessible Word Spacing
Proper word spacing improves readability for users who rely on adjusted spacing for clarity.
In your HTML, find the element with CSS that controls word spacing (e.g.,
<p style="word-spacing: 0.1em !important;">).Remove
!importantfrom theword-spacingvalue if it’s used.Set the
word-spacingvalue to at least0.16em.
Example
<!-- Incorrect -->
<p style="word-spacing: 0.1em !important;">Inaccessible word spacing example.</p>
<!-- Correct -->
<p style="word-spacing: 0.16em;">This is an example paragraph with accessible word spacing.</p>Resolving Inaccessible Line Height
Accessible line height improves readability and helps users navigate text blocks more easily.
In your HTML code, find the element with CSS that controls line height (e.g.,
<div style="line-height: 1.2 !important;">).Remove
!importantfrom theline-heightvalue if it’s used.Set the
line-heightvalue to at least1.5.
Example
<!-- Incorrect -->
<div style="line-height: 1.2 !important;">Inaccessible line height example.</div>
<!-- Correct -->
<div style="line-height: 1.5;">This block of text has accessible line height.</div>2.1.1 Keyboard
All features and controls must be usable with a keyboard alone, without needing to press keys quickly or in a specific time frame.
Resolving Inaccessible Scrollable Regions
All parts of a scrollable page must be operable with a keyboard. This allows users who rely on keyboard navigation to scroll and access the content.
In your HTML code, locate the scrollable container (e.g.,
<div>or<section>withoverflow: autooroverflow: scrollin CSS).Within the scrollable element, locate or add the
tabindexattribute.Set
tabindex="0"to make the scrollable region focusable with a keyboard.
Example
<!-- Incorrect -->
<div style="overflow: auto; height: 200px;">
<p>This content cannot be scrolled using the keyboard.</p>
</div>
<!-- Correct -->
<div style="overflow: auto; height: 200px;" tabindex="0">
<p>This content can now be scrolled using the keyboard.</p>
</div>Resolving Inaccessible Inline Frames
Inline frames should not use negative tabindex values, as this prevents keyboard users from accessing them.
In your HTML code, locate the inline frame (
<iframe>) element.Within the
<iframe>element, locate thetabindexattribute.Remove any negative tabindex value (e.g.,
tabindex="-1") and replace it withtabindex="0"to make it accessible by keyboard.
Example
<!-- Incorrect -->
<iframe src="video.html" tabindex="-1"></iframe>
<!-- Correct -->
<iframe src="video.html" tabindex="0"></iframe>2.2.1 Timing Adjustable
Resolving User-Controlled Timed Content Changes
To ensure accessibility for users, content that automatically refreshes must be user-controllable or adequately signaled, allowing them to adjust the refresh rate.
In your HTML code, locate the
<meta>element within the<body>element.
Note: If the<meta>element doesn’t exist, add a new<meta>tag.Add a
http-equiv="refresh"attribute to the<meta>element.If the
<meta>element exists but the refresh time is too short, adjust thecontentattribute to set a longer refresh interval (e.g.,content="72000").
Example
<!-- Incorrect -->
<meta http-equiv="refresh" content="5">
<!-- Correct -->
<meta http-equiv="refresh" content="72000">2.2.2 Pause, Stop, Hide
Resolving Deprecated Tags in Content
To promote modern and accessible web practices, avoid using deprecated HTML elements, such as <blink> and <marquee>, as they are not supported by many assistive technologies and may cause accessibility issues.
In your HTML code, locate any deprecated tags such as
<blink>or<marquee>.Replace the
<blink>or<marquee>tag with a more accessible alternative, such as a<span>tag, and apply appropriate CSS for animation or styling.
Example
<!-- Incorrect -->
<blink>Registration ends soon!</blink>
<marquee>Scrolling announcement</marquee>
<!-- Correct -->
<span style="animation: blink-animation 1s infinite;">Registration ends soon!</span>
<div style="animation: scroll-left 10s linear infinite;">Scrolling announcement</div>2.4.1 Bypass Blocks
Resolving the Missing Bypass Mechanism
A "Skip to main content" link helps users skip repetitive navigation elements and jump directly to the page's core content.
In your HTML code, locate the
<body>element.Right after the opening
<body>tag, add an<a>tag and use thehrefattribute to point to the main content section (the<main>element). This link allows users to skip over navigation and go directly to the main content.
Note: You can use an ID reference to the main content section (e.g., id="main-content") for easy navigation.
Example
<!-- Incorrect -->
<body>
<nav>...</nav>
<main id="main-content">...</main>
</body>
<!-- Correct -->
<body>
<a href="#main-content">Skip to main content</a>
<nav>...</nav>
<main id="main-content">...</main>
</body>2.4.2 Page Titled
Resolving Missing Page Titles
A descriptive title helps users understand the purpose of the page and helps with navigation, especially for users with screen readers.
In your HTML code, locate the
<head>section of the page.Add a
<title>element within the<head>element.Enter a clear and descriptive title for the page inside the
<title>tag.
Example
<!-- Incorrect -->
<head>
</head>
<!-- Correct -->
<head>
<title>Contact Us - YuJa Inc.</title>
</head>2.4.3 Focus Order
Keyboard users must be able to move through content in a clear, logical order that makes sense.
Resolving Incorrect Focus Order
The focus order ensures that interactive elements are navigable in a logical, intuitive sequence for keyboard users.
In your HTML code, locate the flagged interactive element (e.g.,
<a>,<button>,<input>, etc.).Check its order in the HTML code and ensure it follows a logical sequence from the top of the page or section to the bottom, without skipping any important elements. Learn more about focus order.
Note:
If any elements are not in the desired focus order, change their
tabindexvalues to ensure a correct focus sequence.If you are making a custom element focusable (like a
<div>or<span>), usetabindex="0"to include it in the natural tab order.
Example
<!-- Incorrect-->
<button>Start</button>
<input type="text" placeholder="First Name" tabindex="3">
<input type="text" placeholder="Last Name" tabindex="1">
<button>Submit</button>
<!-- Correct-->
<button>Start</button>
<input type="text" placeholder="First Name" tabindex="1">
<input type="text" placeholder="Last Name" tabindex="2">
<button>Submit</button>2.4.4 Link Purpose
Each link’s purpose must be obvious from the link text itself or from the information around it.
Resolving Missing Link Descriptions
Every link must clearly describe its purpose to help users understand what will happen when they activate it.
In your HTML code, locate the element used as a link (e.g.,
<a>,<input>, or<button>with a link action).Replace the vague link text (e.g., "Click here" or "More") with a short, descriptive text that explains the destination or action.
Note: If the link uses icons or images, add an accessible name usingaria-labelortitleattribute.
Example
<!-- Incorrect -->
<a href="/reports">Report</a>
<!-- Correct -->
<a href="/reports">View quarterly reports</a>
2.4.5 Multiple Ways Checker
Resolving Missing Multiple Navigation Methods Issue
Pages should provide more than one way for users to locate content. Common options include navigation landmarks, a search function, or a "skip navigation" link. Adding at least two methods helps users with different needs navigate the page more easily.
- In your HTML code, add a different way for users to locate the content, either by:
-
-
Adding a navigation landmark to identify the main navigation region.
<nav> <ul> <li><a href="/home">Home</a></li> <li><a href="/courses">Courses</a></li> <li><a href="/contact">Contact</a></li> </ul> </nav> -
Adding a search landmark to a search feature, if there is one.
<form role="search"> <label for="search">Search</label> <input id="search" type="text" name="q"> <button type="submit">Go</button> </form> -
Adding a "skip navigation" link at the top of your page so users can bypass repeated content.
<a href="#maincontent" class="skip-link">Skip to main content</a>
-
-
- Save your changes and reload the page.
2.4.6 Headings and Labels
Resolving Missing Labels on Form Fields
Form fields need descriptive labels so users understand what information they are expected to enter.
In your HTML code, locate the
<form>element and its fields (e.g.,<input>,<textarea>).For each field, add a
<label>element before it.Within the
<label>element, include afor=""attribute with a value that matches theidof the corresponding form field.
Example
<!-- Incorrect -->
<input type="email" id="email" name="email" />
<!-- Correct -->
<label for="email">Email address</label> <input type="email" id="email" name="email" />rly reports</a>Resolving Unlabeled Buttons
Buttons must have clear labels to indicate what action they perform. Accessible labels ensure that users with screen readers understand the button's purpose.
In your HTML code, locate the
<button>element.Within the
<button>element, add anaria-labelattribute.Within the
aria-labelattribute, enter a short description that communicates the button’s purpose.
Example
<!-- Incorrect -->
<button>Close</button>
<!-- Correct -->
<button aria-label="Close window">Close</button>2.4.8 Location
Resolving Missing Page Location Indicators
Pages should provide users with a way to understand their location within the site or application. This can be done by adding breadcrumb trails, sitemap links, current page indicators, or relational links.
- In your HTML code, locate the section where navigation elements are located, or page structure is identified (e.g., elements inside a
nav,header, or near the top of the page'sbody). - Add a page location indicator to your navigation elements, either by:
-
Adding a breadcrumb trail: Insert a
navelement with an ordered list showing the path to the current page. It is a navigation aid that shows users the path they took to reach their current location.<nav aria-label="Breadcrumb"> <ol> <li><a href="/home">Home</a></li> <li><a href="/courses">Courses</a></li> <li aria-current="page">Course Details</li> </ol> </nav> -
Adding a sitemap link: Place the sitemap link within the
footerof your HTML code.<footer> <a href="/sitemap">Sitemap</a> </footer> -
Adding a current page indicator: Locate the
atag for the active page and include thearia-current="page"attribute.<nav> <ul> <li><a href="/home">Home</a></li> <li><a href="/about" aria-current="page">About</a></li> </ul> -
Adding relational links: Locate the
headsection of your HTML code and insertlinkelements for previous, next, or parent pages.<link rel="prev" href="/chapter-1"> <link rel="next" href="/chapter-3"> <link rel="up" href="/table-of-contents">
-
- Confirm that at least one location indicator is present.
- Save your changes and reload the page.
2.4.9 Link Purpose Checker
Resolving Link Purpose Issues
Links that have the same accessible name (the link text or its labelaria-label) should lead to the same destination. If two links look the same but go to different places, users may become confused.
- In your HTML code, locate the links that were flagged for having the same link text or aria-label.
- Resolve the issue by following one of the options below:
-
If the links should point to the same destination, locate the
atag of the links, then update thehrefvalues within them to be the same.<a href="/about">Read more</a> <a href="/about">Read more</a> -
If the links should point to different destinations, change the link text or
aria-labelclearly describe each purpose.<a href="/about">Read more about us</a> <a href="/contact">Read more about contacting us</a> - Save your changes and reload the page.
2.4.10 Heading Checker
Resolving Missing Page Headings
Headings help users understand the structure of a page. Without headings with proper structure, it can be difficult for people using assistive technologies to navigate and understand the content.
- In your HTML code, locate the main content area of the page (e.g., the
body -
Add heading elements that describe the main topic of the page.
Note: Each page should start with at least oneh1element. If the page has multiple sections, add subheadings (e.g.,h2,h3,h4)<h1>Course Overview</h1> <h2>Course Objectives</h2> <h2>Course Materials</h2> <h3>Required Readings</h3> <h3>Optional Resources</h3> - Ensure at least one heading is present and that headings create a clear outline of the page content.
- Save your changes and reload the page.
2.4.10 Section Heading Checker
Resolving Missing Section Headings
Each section element should include a heading to describe its purpose. Without a heading, users may not understand the content or function of that section.
- In your HTML code, locate the
sectionelement that was flagged. - Add a
h2element as the first child element insidesection.
Note: The heading level might depend on your page’s heading structure. -
Within the
h2element, include a heading for your section.<section> <h2>Advanced Accessibility</h2> <p>This course covers advanced topics in accessibility.</p> </section> - Save your changes and reload the page.
2.5.3 Label in Name
Resolving Mismatched Accessible Name and Visible Label
Ensure that the accessible name of interactive elements matches their visible label, preventing confusion and ensuring clarity for users relying on assistive technologies.
In your HTML code, locate the interactive element (e.g.,
button,div) that has anaria-labelattribute.Replace the element’s content with the same text used in the
aria-labelattribute.
Example
<!-- Incorrect -->
<button aria-label="Submit Form">Send</button>
<!-- Correct -->
<button aria-label="Submit Form">Submit Form</button>2.5.5 Target Size
Resolving Insufficient Interactive Element Size
Interactive elements, such as buttons, links, and form controls, must be large enough for users to interact with easily using a mouse or keyboard.
In your HTML code, locate the interactive element (e.g.,
button,input,textarea).Locate the
widthandheightattributes within your element.Adjust the
widthandheightattributes to ensure the element’s size has a minimum of 44px by 44px (e.g.,width: 44px; height: 44px).
Example
<!-- Incorrect -->
<button style="width: 16px; height: 16px;">More Infomation</button>
<!-- Correct -->
<button style="width: 44px; height: 44px;">More Information</button>2.5.8 Target Size (Minimum)
Resolving Small Touch Target Size
Touch targets, such as buttons, links, or other interactive elements, must be large enough to ensure that users on touchscreen devices can easily tap them.
In your HTML code, locate the interactive element (e.g.,
button,input,textarea).Locate the
widthandheightattributes within your element.Adjust the
widthandheightattributes to ensure the element’s size has a minimum of 24px by 24px (e.g.,width: 24px; height: 24px).
Example
<!-- Incorrect -->
<button style="width: 16px; height: 16px;">Infomation</button>
<!-- Correct -->
<button style="width: 24px; height: 24px;">Infomation</button>3.1.1 Language of Page
Resolving Missing Language Declaration
Every web page needs to specify the language it’s written in, so assistive technologies, such as screen readers, can read the content correctly.
In your HTML code, locate the
<html>element.Within the
<html>element, add alangattribute and enter a value to reflect the correct language of the page (e.g.,lang="en"for English,lang="es"for Spanish ).
Example
<!-- Incorrect --> <html> <!-- Correct --> <html lang="en">
Resolving Mismatched Declared Language
The declared language of the page must match the actual language used in the content, allowing assistive technologies to interpret and present the content correctly.
In your HTML code, locate the
<html>element.Within the
<html>element, locate thelangandxml:langattributes.Set the value of the
langandxml:langattributes to the same valid language code that matches the language used in your content.
Example
<!-- Incorrect --> <html lang="fr" xml:lang="en"> <!-- Correct --> <html lang="en" xml:lang="en">
3.1.2 Language of Parts
Resolving Mismatched Language of Content
If parts of your web page are in a different language, you need to let assistive technologies, such as screen readers, know about the change. This helps users who rely on these tools understand the content in the correct language.
In your HTML code, locate the content element (e.g.,
<p>,<span>,<div>) where the language changes.Within the content element, add a
langattribute and enter a value to reflect the correct language of the page (e.g.,lang="en"for English,lang="es"for Spanish ).
Example
<!-- Incorrect --> <p>Este es un párrafo en español.</p> <!-- Correct --> <p lang="es">Este es un párrafo en español.</p>
3.2.2 On Input
Resolving Unexpected Context Changes on Focus
When users move focus to a form button (using Tab or other keys), it should not automatically submit the form, reload the page, or navigate elsewhere. Actions like submitting a form should only occur when the user explicitly activates the button, such as by clicking or pressing the Enter key.
In your HTML, locate the
<form>element.Within the
formelement, locate the<button>or<input type="submit">that submits the form.Within the
<button>or<input type="submit">element, remove the attributeonfocusoronmouseoverthat submits the form on focus.Use a clearly labeled submit button that only submits the form when clicked or when Enter is pressed (e.g.,
<button type="submit">Submit</button>).
Example
<!-- Incorrect --> <form action="/submit" method="post"> <input type="text" name="name" required> <button type="submit" onfocus="this.form.submit()">Submit</button> </form> <!-- Correct --> <form action="/submit" method="post"> <input type="text" name="name" required> <button type="submit">Submit</button> </form>
3.2.4 Consistent Identification
Resolving Non-Descriptive Link Text
Links must have text that clearly describes their purpose or destination.
In your HTML, locate the
<a>element with vague or generic text, such as "click here".Replace the text between the
<a>tags with descriptive link text that explains the destination or purpose.
Example
<!-- Incorrect --> <a href="/report">Click here</a> <!-- Correct --> <a href="/report">View Annual Report</a>
3.2.5 Change on Request
Informing Users About New Tabs
If a link opens in a new tab or window, users should be clearly informed. This helps prevent confusion, especially for people using screen readers or keyboard navigation, by specifying the right expectation.
In your HTML code, locate the
<a>element withtarget="_blank"attribute.Add an
aria-labelor update the visible text to include “(opens in a new tab)”.
Example
<!-- Incorrect --> <a href="https://example.com" target="_blank">Visit Example</a> <!-- Correct --> <a href="https://example.com" target="_blank" aria-label="Visit Example (opens in a new tab)">Visit Example</a>
3.3.1 Error Identification
Marking Error Descriptions for Input Fields as Atomic
When form errors are announced using a live region with aria-live="assertive", it must also include aria-atomic="true". This ensures the entire error message is read out to screen reader users.
In your HTML code, locate the element with
aria-live="assertive"used to announce error messages..Add the
aria-atomic="true"attribute to the same element.
Example
<!-- Incorrect --> <label for="email">Email</label> <input type="email" id="email" name="email" required> <div id="email-error" aria-live="assertive"> Please enter a valid email address. </div> <!-- Correct --> <label for="email">Email</label> <input type="email" id="email" name="email" required> <div id="email-error" aria-live="assertive" aria-atomic="true"> Please enter a valid email address. </div>
3.3.2 Input Label
Resolving Unclear Input Label
Form inputs must have accessible names so users, including those using screen readers, know what information is being requested. Without a label or aria-label, the purpose of the input is unclear.
- In your HTML code, locate the
inputelement that was flagged. -
Within the element, add an
aria-labelattribute to provide an accessible name for the input.<input type="text" aria-label="First Name"> - Save your changes and reload the page.
4.1.2 Name, Role, Value
User interface elements must provide their name, purpose, and current value so assistive technologies can understand and interact with them.
Resolving Missing Accessible Names for User Interface Elements
All buttons, inputs, and other interactive elements must have accessible names so screen readers can announce what each item does.
In your HTML code, locate the user interface components such as
<input>,<button>,<select>, or other clickable elements.Within the component, add an accessible name using one of the following methods:
Add a
<label>element with aforattribute linked to the element’sid(e.g.<label for="username">Username</label>).Use the
aria-labelattribute to describe the element directly (e.g.aria-label="Search this site").Use the
aria-labelledbyattribute to reference another element that contains the name (e.g.aria-labelledby="search-label").
Example
<!-- Incorrect --> <input type="text" id="username" name="username"> <!-- Correct --> <input type="text" id="username" name="username" aria-label="Username">
ARIA Accessibility Issues
Resolving Missing Accessible Names for Links
Links should have accessible names that describe their destination or function.
In your HTML code, locate the
<a>element.Within the
<a>element, add atitleoraria-labelattribute that clearly describes where the link leads or what it does.
Example
<!-- Incorrect --> <a href="/downloads/report.pdf">Download Report</a> <!-- Correct --> <a href="/downloads/report.pdf" title="Download the 2024 Annual Report">Download Report</a>
Removing Invalid ARIA Attributes
ARIA attributes must be used only on specific roles or HTML elements. If an ARIA attribute is used where it is not allowed, it will not work properly and may confuse users.
In your HTML code, locate the element with invalid ARIA attributes (e.g.,
aria-liveon<button>,aria-expandedon<div>).Remove the invalid ARIA attributes, or add the correct role attribute that matches the ARIA attribute.
Example
<!-- Incorrect --> <div aria-checked="true">Option 1</div> <!-- Correct --> <div role="checkbox" aria-checked="true">Option 1</div>
Resolving Invalid ARIA Roles
Only valid ARIA roles should be used to define the role of elements.
In your HTML code, locate the
roleattribute on any element.Replace any invalid role value with a valid ARIA role defined in the ARIA specification.
Example
<!-- Incorrect --> <div role="navigationbar">Main Menu</div> <!-- Correct --> <div role="navigation">Main Menu</div>
Resolving Missing Accessible Name for Braille Properties
When braille properties are used, they must have a corresponding accessible name that assistive technologies can understand.
In your HTML code, locate any element with the
aria-braillelabeloraria-brailleroledescriptionattribute.Within the element, add an
aria-labelthat matches the meaning of the braille label.
Example
<!-- Incorrect --> <div aria-braillelabel="Submit Button"></div> <!-- Correct --> <div aria-braillelabel="Submit Button" aria-label="Submit"></div>
Resolving Conditionally Incorrect ARIA Attributes
ARIA attributes should only be used when required by the context of the element’s role. When an attribute is needed, it should be used appropriately to ensure accurate accessibility.
In your HTML code, locate the element with the flagged ARIA attribute (e.g.,
aria-expanded,aria-checked).Locate the
rolewithin the element (e.g.,role="button",role="checkbox").Refer to the ARIA roles specification to check if the attribute is required for that role.
Remove the invalid attribute for the element’s role.
Note: If the attribute is required, make sure the attribute’s value is correct.
Example
<!-- Incorrect --> <p aria-expanded="true">Click here for more details on the product.</p> <!-- Correct --> <p>Click here for more details on the product.</p>
Resolving Use of Deprecated ARIA Roles
Outdated ARIA roles should be replaced with the updated roles to maintain accessibility standards.
In your HTML code, locate the element with the deprecated ARIA role (e.g.,
role="presentation",role="toolbar").Replace the deprecated role with a valid ARIA role that better fits the element’s purpose (e.g.,
role="none",role="navigation").
Example
<!-- Incorrect --> <div role="toolbar"> <button>Save</button> <button>Cancel</button> </div> <!-- Correct --> <div role="navigation"> <button>Save</button> <button>Cancel</button> </div>
Resolving Invalid ARIA Dialogs
Dialog elements should have a valid accessible name to ensure they are described properly for assistive technologies.
In your HTML code, locate the element with the
role="dialog"orrole="alertdialog"(e.g.,<div role="dialog">).Within the element, add an
aria-labeloraria-labelledbyattribute and include an accessible name for the dialog.
Example
<!-- Incorrect --> <div role="dialog"> <h2>Unsaved Changes</h2> <p>You have unsaved changes. Are you sure you want to leave?</p> </div> <!-- Correct --> <div role="dialog" aria-label="Unsaved Changes"> <h2>Unsaved Chages</h2> <p>You have unsaved changes. Are you sure you want to leave?</p> </div>
Resolving Hidden Body Element
Ensure that the body element is not improperly hidden from assistive technologies.
In your HTML code, locate the
<body>element.Remove any
aria-hidden="true"attributes from the<body>element to ensure the content remains accessible.
Example
<!-- Incorrect --> <body aria-hidden="true"> <h1>Welcome to Our Website</h1> <p>Explore our features and services.</p> </body> <!-- Correct --> <body> <h1>Welcome to Our Website</h1> <p>Explore our features and services.</p> </body>
Resolving Missing Accessible Names for Input Fields
Input fields should have an accessible name to describe their purpose to users.
In your HTML code, locate the input field element (e.g.,
<input>,<select>,<textarea>).Within the element, add an
aria-labeloraria-labelledbyattribute to include an accessible name for the input field.
Example
<!-- Incorrect --> <input type="text" name="email"> <!-- Correct --> <input type="text" name="email" aria-label="Email address">
Resolving Use of Prohibited ARIA Attributes
Some ARIA attributes are not allowed on certain elements because they can confuse screen readers or create accessibility issues.
In your HTML code, locate the element with an ARIA attribute that is prohibited (e.g.,
aria-pressedon a non-interactive element).Remove the prohibited ARIA attribute from the element.
Example
<!-- Incorrect --> <div aria-pressed="true"> <span>Save changes</span> </div> <!-- Correct --> <div> <span>Save changes</span> </div>
Resolving Missing Required ARIA Attributes
Some ARIA roles need specific attributes to communicate their purpose to assistive technologies. If those attributes are missing, users who rely on screen readers might not understand how the element behaves. Learn more about which ARIA attributes are required for each role.
In your HTML code, locate the element with the flagged ARIA role (e.g.,
role="checkbox",role="slider",role="progressbar").Identify the missing required ARIA attribute for that role (e.g.,
aria-checked,aria-valuenow,aria-valuemin).Add the missing ARIA attribute with an appropriate value that reflects the element’s state or behavior.
Example
<!-- Incorrect --> <div role="slider" tabindex="0"></div> <!-- Correct --> <div role="slider" aria-valuemin="0" aria-valuemax="100" aria-valuenow="50" tabindex="0"></div>
Resolving Missing Required ARIA Children
Some parent roles require specific child roles for proper accessibility. If these are missing, screen readers may not be able to interpret the structure correctly. Learn more about the ARIA roles list.
In your HTML code, locate the parent element with a role that requires specific child elements (e.g., role="list" must contain child elements with
role="listitem").Add the required child element with the appropriate
roleattributes.
Example
<!-- Incorrect --> <div role="list"> <div>First Name</div> <div>Last Name</div> </div> <!-- Correct --> <div role="list"> <div role="listitem">First Name</div> <div role="listitem">Last Name</div> </div>
Resolving Missing Required ARIA Parent
Some ARIA roles must be inside a specific parent role to maintain semantic meaning. Without the correct parent, assistive technologies may not interpret the element properly. Learn more about the ARIA roles list.
In your HTML code, locate the element with a role that requires a specific parent (e.g.,
role="row"should be insiderole="table"orrole="rowgroup").Add the required parent element with the appropriate
roleattributes.
Example
<!-- Incorrect --> <div role="row"> <div role="cell">User Name</div> </div> <!-- Correct --> <div role="table"> <div role="row"> <div role="cell">User Name</div> </div> </div>
Resolving Invalid ARIA Role Usage
Invalid ARIA roles don’t exist in the ARIA specification and are ignored by assistive technologies, which can make your content harder to understand or navigate. Learn more about the ARIA roles list.
In your HTML code, locate the element with an invalid role value (e.g.,
role="unsupportedrole",role="presentation").Replace the
roleattribute with a valid role based on the element’s function.
Example
<!-- Incorrect --> <div role="structure"> Content about accessibility. </div> <!-- Correct --> <div role="region" aria-label="Accessibility Info"> Content about accessibility. </div>
Resolving Use of Abstract ARIA Roles
Abstract ARIA roles are not meant to be used directly in code. They exist only to define shared characteristics of other roles, and using them does not affect assistive technology. Learn more about the ARIA roles list.
In your HTML code, locate the element using an abstract ARIA role (e.g.,
role="input",role="command",role="widget").Replace the
roleattribute with a concrete role that reflects the element’s actual purpose.
Example
<!-- Incorrect --> <div role="command">Run</div> <!-- Correct --> <div role="button">Run</div>
Resolving Use of Unsupported ARIA Roles
The ARIA specification does not recognize unsupported ARIA roles and may not work properly across browsers or screen readers. This can lead to confusion or ignored content. Learn more about the ARIA roles list.
In your HTML code, locate the element with an unsupported ARIA role (e.g.,
role="footnote",role="banneritem",role="error").Replace the
roleattribute with a supported ARIA role that reflects the element’s purpose.
Example
<!-- Incorrect -->
<span role="error">Invalid input</span>
<!-- Correct -->
<span role="alert">Invalid input</span>Resolving Use of Invalid ARIA Role Description
An incorrect custom role description can confuse assistive technologies and users. It should only be used when you need to override the default role description with something more meaningful.
In your HTML code, locate the element with an invalid
aria-roledescription.Remove the
aria-roledescriptionor replace it with an accuratearia-label.
Example:
<!-- Incorrect -->
<div role="button" aria-roledescription="Clicky thing">Submit</div>
<!-- Correct -->
<div role="button" aria-label="Submit Form">Submit</div>Resolving Missing Accessible Name for Toggle Elements
Toggle elements, such as checkboxes, radios, and switches, need clear names so that screen readers can describe their state and function.
In your HTML code, locate the toggle element without an accessible name (e.g.,
role="checkbox",role="radio",role="switch").Add an accessible name using the
aria-labeloraria-labelledbyattribute.
Example
<!-- Incorrect -->
<div role="switch"></div>
<!-- Correct -->
<div role="switch" aria-label="Dark mode toggle"></div>Resolving Invalid ARIA Attribute Values
ARIA attributes must use specific values. Using the wrong value can confuse assistive technologies and cause accessibility issues. Learn more about ARIA values.
In your HTML code, locate the element with an invalid ARIA value (e.g.,
aria-expanded="perhaps",aria-checked="maybe").Replace the invalid value with one that is allowed by the ARIA specification.
Example
<!-- Incorrect -->
<input type="checkbox" aria-checked="sometimes">
<!-- Correct -->
<input type="checkbox" aria-checked="true">Resolving Invalid ARIA-Level Values
The aria-level attribute must be a positive integer starting at 1. It is used on elements with a heading role to indicate their level in the document structure.
In your HTML code, locate any use of the
aria-levelattribute with a value of 0, a negative number, or a non-integer (e.g.,aria-level="zero",aria-level="0",aria-level="-1")Replace the value with a positive integer (1 or higher).
Note: You should only use the aria-level attribute on elements with role="heading". If the element does not have a heading role, remove the attribute.
Example
<!-- Incorrect -->
<div role="heading" aria-level="zero">Title</div>
<!-- Correct -->
<div role="heading" aria-level="1">Title</div>Resolving Invalid ARIA Attributes
Some ARIA attributes may be misspelled or used in the wrong place. These attributes won’t work and may mislead assistive technologies. Learn more about ARIA attributes.
In your HTML code, locate the element with an invalid or misspelled ARIA attribute (e.g.,
aria-unchecked,aria-visible,aria-foo).Remove the invalid ARIA attribute or replace it with a valid one.
Example
<!-- Incorrect -->
<button aria-unchecked="true">Submit</button>
<!-- Correct -->
<button aria-pressed="false">Submit</button>
Resolving Focusable Elements Using the Presentation Role
Elements with presentation role are meant to be ignored by screen readers. When these elements are focusable, the presentation role may confuse screen readers.
In your HTML code, locate any focusable element with
role="presentation"orrole="none"(e.g., Elements withtabindex="0"or native focusable elements such as<a>and<button>).Remove the presentation role (
role="presentation"orrole="none") to preserve the element’s interactive meaning.
Note: If the element is not meant to be interactive, remove the focusable elements instead, such as by removing tabindex or the href attribute.
Example
<!-- Incorrect -->
<a href="#" role="presentation">Link</a>
<!-- Correct -->
<a href="#">Link</a>Resolving Global ARIA Attributes on Presentation Role Elements
Elements with presentation role are meant to be ignored by assistive technologies. When these elements include both presentation roles and global ARIA attributes, they may confuse screen readers.
In your HTML code, locate a focusable element containing
role="presentation"orrole="none"that also includes global ARIA attributes, such asaria-label,aria-describedby, oraria-hidden.Remove the presentation role (
role="presentation"orrole="none") to preserve the element’s interactive meaning.
Note: If the element is not meant to be interactive, remove the ARIA attributes instead.
Example
<!-- Incorrect -->
<div role="presentation" aria-label="Decorative container"></div>
<!-- Correct -->
<div aria-label="Decorative container"></div>p>Resolving Invalid Tabindex Values
Using tabindex with a value of -1 or 0 can incorrectly disrupt the flow of keyboard navigation, making it harder for users to navigate through content.
In your HTML code, locate the element with an inappropriate
tabindexvalue (e.g.,tabindex="-1",tabindex="0").Remove the tabindex value to restore normal keyboard navigation.
Example
<!-- Incorrect -->
<h2 tabindex="-1">Header</h2>
<!-- Correct -->
<h2>Header</h2>Resolving Redundant ARIA Roles
If an element can already convey its native meaning, adding a matching ARIA role is unnecessary and can confuse assistive technologies.
In your HTML code, locate the element with a redundant role (e.g.,
<button role="button">,<a role="link">).Remove the redundant
roleattribute.
Example
<!-- Incorrect --> <button role="button">Save</button> <!-- Correct --> <button>Save</button>
Best Practices
Achieving good accessibility requires fixing common coding and content issues to improve clarity, organization, and usability for all users. Applying best practices helps create content that are more inclusive and user-friendly.
Resolving Use of Visual Tags Without Semantic Meaning
Use semantic tags like <strong> and <em> instead of visual-only tags like <b> and <i> to help assistive technologies understand the importance or emphasis of text.
In the HTML code, locate the
<b>tags and replace them with<strong>if the text is important.In the HTML code, locate the
<i>tags and replace them with<em>if the text should be emphasized.
Example
<!-- Incorrect -->
<p><b>Important:</b> Save your changes.</p>
<p><i>Note:</i> Restart required.</p>
<!-- Correct -->
<p><strong>Important:</strong> Save your changes.</p>
<p><em>Note:</em> Restart required.</p> Resolving Non-Unique Alternative Text Issues
Images must have alternative text (alt text) that accurately describes their content. If two images show different content but share the same alt text, users may be misled. Likewise, when two images use the same file source but have different alt text, this creates inconsistency.
In your HTML code, locate the
<img>elements that were flagged for a non-unique alt text issue.-
For images with different sources (
src) but share the same alt text, update the alt text so that each description is unique and matches the image content.<img src="team-photo.jpg" alt="Team standing together outside office"> <img src="office.jpg" alt="Front view of office building"> -
For images with the same source (
src), make sure the alt text is consistent across all instances.<img src="logo.png" alt="Company logo"> <img src="logo.png" alt="Company logo"> Save your changes and reload the page.
Resolving Repeated Alt Text on Images
Using the same alt text for multiple images can be confusing for users of screen readers. Each image should have a unique alt attribute that describes its specific content or purpose.
In your HTML code, locate the
<img>element with the same alternative description in thealtattribute.Update the description in the
altattribute on the image to describe its specific content.
Note: If the image is purely decorative, use an emptyaltattribute (alt="") instead.
Example
<!-- Incorrect -->
<img src="math-icon.png" alt="Icon"> <img src="science-icon.png" alt="Icon">
<!-- Correct -->
<img src="math-icon.png" alt="Math icon showing a calculator"> <img src="history-icon.png" alt="History icon showing a scroll and feather pen">Resolving Landmark Roles on Nested Elements
Landmark roles are meant to identify major regions of a page. They should only be used on top-level elements to support accessible navigation.
In your HTML code, locate the element with the landmark role (e.g.,
role="main",role="banner",role="navigation") that is inside other structural elements (e.g.,<div>,<section>, or<article>)Move the landmark role outside the structural elements and place it under the
<body>tag, or at the top level of your code layout.
Example
<!-- Incorrect -->
<div class="article"> <section role="main">Content</section> </div>
<!-- Correct -->
<section role="main">Content</section>Resolving Duplicate Landmark Regions
Landmarks help users navigate by defining page structure. Using the same role multiple times without a clear distinction can confuse users of assistive technologies.
In your HTML code, locate the element with repeated landmark roles (e.g.,
role="navigation",role="main")Remove the duplicated landmark that does not serve a distinct purpose, or change the landmark role to one that better reflects the section’s function.
Note: If multiple landmarks with the same role are necessary, add a unique label usingaria-labeloraria-labelledbyto help differentiate them.
Example
<!-- Incorrect -->
<nav role="navigation">Main links</nav> <nav role="navigation">Sidebar links</nav>
<!-- Correct -->
<nav role="navigation" aria-label="Main">Main links</nav> <nav role="navigation" aria-label="Sidebar">Sidebar links</nav>Resolving Invalid Scope Attributes on Table Headers
The scope attribute connects table headers to data cells. Using incorrect values or leaving them out can make tables harder for screen reader users to interpret.
In your HTML code, locate the
<th>element with an invalid or missingscopeattribute value.-
Replace or add the
scopevalue based on the header type:Use
scope="col"for column headers.Use
scope="row"for row headers.
Note: For multi-level headers, use
rowgrouporcolgroupif grouping applies.
Example
<!-- Incorrect -->
<th scope="column">Course</th>
<!-- Correct -->
<th scope="col">Course</th>
Resolving Incorrect <noscript> Elements
The <noscript> element provides fallback content for users who have JavaScript disabled. Ensure it contains meaningful, accessible content and does not duplicate or hide essential information. You should not rely on <noscript> content for important functionality unless an accessible alternative is provided.
- In your HTML code, locate the flagged <noscript> elements.
- Within your <noscript> elements, ensure they contain useful fallback content that informs users what functionality is unavailable without JavaScript.
Note: For <noscript> elements that are empty, duplicates, or purely decorative, remove them.
Example
<!-- Incorrect -->
<noscript></noscript>
<!-- Correct -->
<noscript>
<p>This site requires JavaScript to function properly. Please enable JavaScript in your browser.</p>
</noscript>
Resolving Missing or Improperly Defined Surrounding Regions
Using region elements like <header>, <nav>, <main>, <aside>, and <footer> helps describe how your page is structured. These elements tell screen readers where key parts of the page begin and end.
- In your HTML code, locate the main areas of your page (e.g., the top banner, navigation menu, main content, sidebar, or footer).
- If your page uses general containers like <div>, update them to use the correct region element (e.g., Replace <div id="main"> with <main>.)
- Ensure you have added the correct region element around each area:
- <header> for the top section or site heading
- <nav> for the navigation links.
- <main> for the central page content.
- <aside> for extra or related information.
- <footer> for the bottom section or closing content.
- If you use ARIA roles (e.g., role="main" or role="navigation"), place them inside the right region element.
Note: Use ARIA roles only if you can’t use native HTML region elements.
Example
<!-- Incorrect -->
<div id="header">
<h1>Welcome to Our Site</h1>
</div>
<div id="menu">
<ul><li><a href="#">Home</a></li></ul>
</div>
<div id="content">
<p>Main content goes here.</p>
</div>
<!-- Correct -->
<header>
<h1>Welcome to Our Site</h1>
</header>
<nav>
<ul><li><a href="#">Home</a></li></ul>
</nav>
<main>
<p>Main content goes here.</p>
</main>