WCAG 2.2 Accessibility Standards ‐ Checklist and Examples - bounswe/bounswe2024group1 GitHub Wiki
This document outlines the acceptance criteria as a checklist for implementing WCAG 2.2 standards and provides examples to ensure clear evaluation. By adhering to these guidelines, we aim to make our project accessible to a wide range of users, including those with disabilities. More information can also be found in Standard Implementation Documentation.
-
Alt Text for Non-Text Content
- All images and icons must include appropriate alternative text that conveys their purpose or content.
- Examples:
<img src="profile.jpg" alt="Profile picture of John Doe"> <img src="tag.png" alt="The logo image of Python" title="Python logo">
-
Use of Color & Color Contrast
- Color contrast should ensure that text is legible against its background, particularly for users with visual impairments.
- Example: Updating text with low contrast
-- <p className="line-clamp-3 text-sm font-light text-gray-600"> ++ <p className="line-clamp-3 text-sm font-light text-gray-800">
-
ARIA Labeling for Buttons
- Buttons should have clear labels describing their action.
- Example: Submit form aria label
<button aria-label="Submit form">Submit</button>
-
Screen Reader
- Each icon should have a screen reader-only text.
- Example: sr-only for icons.
<a href="#"> <svg><!-- ... --></svg> <span class="sr-only">Links to official website</span> </a>
- Keyboard Accessibility
- All interactive elements must be navigable using keyboard inputs, with proper focus indication.
- Example: Skip link functionality to allow users to jump to main content
<a href="#main-content" className="sr-only focus:not-sr-only focus:fixed focus:z-50 focus:block focus:bg-background focus:p-4" > Skip to main content </a>
-
Clear Instructions
- Provide concise and clear instructions for completing forms or interacting with components.
- Example:
<label for="email">Email Address:</label> <input type="email" id="email" required> <span class="hint">Please enter a valid email address.</span>
-
Error Identification and Suggestions
- Highlight errors clearly and provide actionable suggestions.
- Example:
<div role="alert" class="error"> Error: Password must be at least 8 characters long. </div>
-
Assistive Technology Compatibility
- Ensure compatibility with screen readers and other assistive tools by adhering to ARIA standards.
- Example:
<div role="tablist" aria-orientation="horizontal"> <button role="tab" aria-selected="true" aria-controls="panel1">Tab 1</button> </div>
-
Automated Testing for Accessibility
- Include automated tests to verify compliance.
- Example:
it("should have proper ARIA attributes", () => { const tablist = screen.getByRole("tablist"); expect(tablist).toHaveAttribute("aria-orientation", "horizontal"); });
This document ensures our WCAG 2.2 implementation aligns with accessibility standards. Each criterion includes examples and evaluation methods to facilitate consistent compliance and foster inclusivity.