What is accessibility?
Accessibility (sometimes abbreviated as a11y for the number of letters between the first and last letters of “accessibility”) is intentionally designing and building websites and tools that as many people as possible can use. People with temporary or permanent disabilities should have the same level of access to digital technologies. And designing for accessibility benefits everyone, including people who access your website on mobile devices or slow networks. Accessible documentation follows web accessibility standards, primarily the Web Content Accessibility Guidelines (WCAG). These guidelines help ensure your content is perceivable, operable, understandable, and robust.Getting started with accessibility
Making your documentation accessible is a process. You don’t have to fix everything all at once and you can’t do it only once. If you’re just beginning to implement accessibility practices for your documentation, consider a phased approach where you start with high-impact changes and build from there.First steps
Here are three things you can do right now to improve the accessibility of your documentation:- Run
mint a11y
to identify accessibility issues in your content. - Add alt text to all images.
- Check your heading hierarchy to ensure one H1 per page and headings follow sequential order.
Plan your accessibility work
The best workflow is the one that works for your team. Here is one way that you can approach accessibility work: Phase 1: Images and structure- Review all images for descriptive alt text.
- Audit link text and replace generic phrases like “click here.”
- Fix heading hierarchy issues across your documentation.
- Test keyboard navigation on your documentation.
- Test screen reader support.
- Add captions and transcripts to embedded videos.
- Review color contrast.
- Run
mint a11y
before publishing new content. - Include accessibility checks in your content review process.
- Test keyboard navigation when adding interactive features.
- Verify new external links and embeds include proper titles and descriptions.
Structure your content
Well-structured content is easier to navigate and understand, especially for screen reader users who rely on headings to move through pages and people who use keyboard navigation.Use proper heading hierarchy
Each page should have a single H1 heading, which is defined by thetitle:
property in a page’s frontmatter. Use additional headings in order without skipping. For example, don’t skip from H2 to H4.
Write descriptive link text
Link text should be meaningful and connected to the destination. Avoid vague phrases like “click here” or “read more.”Keep content scannable
- Break up long paragraphs.
- Use lists for steps and options.
- Highlight information with callouts.
Use proper table structure
Use tables sparingly and only for tabular data that has meaning inherited from the column and row headers. When using tables, include headers so screen readers can associate data with the correct column:Write descriptive alt text
Alt text makes images accessible to screen reader users and appears when images fail to load. Images in your documentation should have alt text that describes the image and makes it clear why the image is included. Even with alt text, you should not rely on images alone to convey information. Make sure your content describes what the image communicates.Write effective alt text
- Be specific: Describe what the image shows, not just that it’s an image.
- Be concise: Aim for one to two sentences.
- Avoid redundancy: Don’t start with “Image of” because screen readers will already know that the alt text is associated with an image. However, you should include descriptions like “Screenshot of” or “Diagram of” if that context is important to the image.
Add alt text to images
For Markdown images, include alt text in the square brackets:alt
attribute:
Add titles to embedded content
Iframes and video embeds require descriptive titles:Design for readability
Visual design choices affect how accessible your documentation is to users with low vision, color blindness, or other visual disabilities.Ensure sufficient color contrast
If you customize your theme colors, verify the contrast ratios meet WCAG requirements:- Body text: minimum 4.5:1 contrast ratio
- Large text: minimum 3:1 contrast ratio
- Interactive elements: minimum 3:1 contrast ratio
mint a11y
command checks for color contrast.
Don’t rely on color alone
If you use color to convey information, include a text label or icon as well. For example, don’t mark errors only with red text. Include an error icon or the word “Error.”Use clear, concise language
- Write in plain language.
- Define technical terms when first used.
- Avoid run on sentences.
- Use active voice.
Make code examples accessible
Code blocks are a core part of technical documentation, but they require specific accessibility considerations to ensure screen reader users can understand them. In general, follow these guidelines:- Break long code examples into smaller, logical chunks.
- Comment complex logic within the code.
- Consider providing a text description for complex algorithms.
- When showing file structure, use actual code blocks with language labels rather than ASCII art.
Specify the programming language
Always declare the language for syntax highlighting. This helps screen readers announce the code context to users:Provide context around code
Provide clear context for code blocks:Video and multimedia accessibility
Videos, animations, and other multimedia content need text alternatives so all users can access the information they contain.Add captions to videos
Captions make video content accessible to users who are deaf or hard of hearing. They also help users in sound-sensitive environments and non-native speakers:- Use captions for all spoken content in videos.
- Include relevant sound effects in captions.
- Ensure captions are synchronized with the audio.
- Use proper punctuation and speaker identification when multiple people speak.
Provide transcripts
Transcripts offer an alternative way to access video content. They’re searchable, easier to reference, and accessible to screen readers:Consider alternatives to video-only content
If critical information only appears in a video:- Provide the same information in text form.
- Include key screenshots with descriptive alt text.
- Create a written tutorial that covers the same material.
Test your documentation
Regular testing helps you catch accessibility issues before users encounter them.Check for accessibility issues with mint a11y
Use the mint a11y
CLI command to automatically scan your documentation for common accessibility issues:
- Missing alt text on images
- Improper heading hierarchy
- Insufficient color contrast
Basic keyboard navigation test
Navigate through your documentation using only your keyboard:- Press Tab to move forward through interactive elements.
- Press Shift + Tab to move backward.
- Press Enter to activate links and buttons.
- Verify all interactive elements are reachable and have visible focus indicators.
Go deeper with accessibility testing
For more comprehensive testing:- Screen readers: Test with NVDA (Windows) or VoiceOver (Mac).
- Browser extensions: Install axe DevTools or WAVE to scan pages for issues.
- WCAG guidelines: Review the Web Content Accessibility Guidelines for detailed standards.
Additional resources
Continue learning about accessibility with these trusted resources:- WebAIM: Practical articles and tutorials on web accessibility
- The A11y Project: Community-driven accessibility resources and checklist
- W3C Web Accessibility Initiative (WAI): Official accessibility standards and guidance