How to fix common accessibility issues
Step-by-step guides for remediating the most common WCAG 2.1 AA violations. Platform-specific instructions included.
Jump to:
Adding Alt Text to Images
CriticalAlt text provides text alternatives for images, enabling screen reader users to understand visual content.
WCAG: 1.1.1 Non-text Content
How to fix
- 1Identify all images on your page (including background images conveying meaning)
- 2For each image, determine its purpose: decorative, informative, or functional
- 3For decorative images, use empty alt: alt=""
- 4For informative images, describe the content concisely (under 125 characters)
- 5For functional images (like buttons), describe the action, not the image
Code Example
<img src="product.jpg"><img src="product.jpg" alt="Blue cotton t-shirt with round neck">Platform-specific instructions
In the Shopify admin, go to Products > select product > click image > add alt text in the field provided
In the media library, click on the image and enter alt text in the 'Alternative Text' field
Add the alt attribute directly to your <img> tags in your HTML
Fixing Color Contrast
SeriousSufficient color contrast ensures text is readable for users with low vision or color blindness.
WCAG: 1.4.3 Contrast (Minimum)
How to fix
- 1Identify elements with insufficient contrast (check your Inclusiv report for specifics)
- 2Use a contrast checker tool to test current ratios
- 3Adjust either the text color or background color to achieve 4.5:1 ratio for normal text
- 4For large text (18pt+ or 14pt+ bold), the minimum ratio is 3:1
- 5Test with a color blindness simulator to verify readability
Code Example
color: #767676; /* 4.48:1 ratio - fails */
background: #ffffff;color: #595959; /* 7:1 ratio - passes */
background: #ffffff;Platform-specific instructions
Edit your theme's CSS in Online Store > Themes > Edit code > Assets > theme.css
Use the Customizer (Appearance > Customize) or edit your theme's style.css
Update the color values in your CSS stylesheet or inline styles
Form Accessibility
CriticalForm fields must have associated labels so screen reader users understand what information to enter.
WCAG: 1.3.1 Info and Relationships, 3.3.2 Labels
How to fix
- 1Ensure every input has a <label> element with matching 'for' and 'id' attributes
- 2Group related fields with <fieldset> and <legend> (e.g., radio button groups)
- 3Add clear error messages that identify the field and describe the error
- 4Use autocomplete attributes for common fields (name, email, address)
- 5Ensure focus indicators are visible on all form elements
Code Example
<input type="email" placeholder="Email"><label for="email">Email address</label>
<input type="email" id="email" name="email"
autocomplete="email" required
aria-describedby="email-hint">
<span id="email-hint">We'll never share your email.</span>Platform-specific instructions
Edit form templates in Sections or Snippets within your theme code
Use accessible form plugins like Gravity Forms or WPForms, or edit your theme templates
Add label elements and proper attributes to your form HTML
Heading Structure
SeriousProper heading hierarchy helps screen reader users understand page structure and navigate content.
WCAG: 1.3.1 Info and Relationships, 2.4.6 Headings
How to fix
- 1Use only one <h1> per page (typically the main page title)
- 2Follow a logical hierarchy: h1 > h2 > h3 (don't skip levels)
- 3Use headings to create an outline of your content
- 4Don't use headings just for visual styling (use CSS instead)
- 5Ensure heading text is descriptive of the section content
Code Example
<h1>Our Products</h1>
<h4>T-Shirts</h4> <!-- Skipped h2, h3 -->
<h2>About Us</h2> <!-- Inconsistent --><h1>Our Products</h1>
<h2>Clothing</h2>
<h3>T-Shirts</h3>
<h3>Jeans</h3>
<h2>Accessories</h2>
<h3>Hats</h3>Platform-specific instructions
Edit section and template files to ensure proper heading hierarchy
Use the Heading block properly in the block editor; check theme templates
Structure your HTML with proper heading hierarchy throughout
Focus Indicators
SeriousVisible focus indicators show keyboard users which element is currently selected.
WCAG: 2.4.7 Focus Visible
How to fix
- 1Never use 'outline: none' without providing an alternative focus style
- 2Ensure focus indicators have sufficient contrast against the background
- 3Make focus indicators clearly visible (not just a subtle color change)
- 4Test focus visibility on all interactive elements
- 5Consider using :focus-visible for better UX (shows focus only for keyboard users)
Code Example
/* Removes all focus indication */
a:focus, button:focus {
outline: none;
}/* Custom focus style */
a:focus-visible, button:focus-visible {
outline: 3px solid #4f46e5;
outline-offset: 2px;
}
/* Or ring style */
a:focus-visible {
box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.5);
}Platform-specific instructions
Add focus styles to your theme.css file; remove any 'outline: none' declarations
Update your theme's stylesheet; check for plugins removing focus outlines
Add :focus and :focus-visible styles to your CSS
Video Captions & Transcripts
CriticalVideos must have captions for deaf users and transcripts for deafblind users.
WCAG: 1.2.2 Captions, 1.2.3 Audio Description
How to fix
- 1Add synchronized captions to all video content
- 2Include speaker identification when multiple people speak
- 3Describe relevant sound effects and music in captions
- 4Provide a text transcript for all video and audio content
- 5For videos with important visual information, add audio descriptions
Code Example
<video src="product-demo.mp4" controls></video><video controls>
<source src="product-demo.mp4" type="video/mp4">
<track kind="captions" src="captions-en.vtt"
srclang="en" label="English" default>
<track kind="descriptions" src="descriptions-en.vtt"
srclang="en" label="Audio Descriptions">
</video>
<a href="transcript.html">Read full transcript</a>Platform-specific instructions
Use YouTube or Vimeo embeds with captions; add transcript links below videos
Upload videos with caption files; use plugins like Starter Templates for accessible embeds
Use the <track> element for captions; host transcript files and link to them
Want AI-generated fixes?
Inclusiv Professional generates copy-paste-ready code fixes specific to your platform and codebase. Stop spending hours figuring out the right code - get exact fixes in seconds.