What is a11y?
a11y is short for accessibility. In software and web development, accessibility means building interfaces that everyone can use, including people with visual, hearing, motor, or cognitive disabilities, and people in everyday situations like bright sunlight, temporary injury, or slow connections.
Why a11y matters
More people can use your product comfortably and independently
Your UI becomes more consistent and easier to navigate for everyone
You reduce frustration and improve trust
You often improve SEO and overall UX through better semantic structure
What a11y looks like in practice
1) Keyboard support
Users should navigate without a mouse
Tab moves between interactive elements
Enter and Space activate controls
Focus should always be visible
If something is clickable, it must be keyboard reachable
2) Screen reader compatibility
Use semantic HTML first (button, label, nav, main, header)
Always connect inputs with labels
Provide meaningful alt text for images
Use ARIA only when HTML cannot express the needed semantics
3) Contrast and readability
Ensure sufficient contrast between text and background
Do not rely only on color to communicate important states
4) Clear feedback and error messages
Explain what went wrong and how to fix it
Make success and error messages easy to notice
Use live regions when messages should be announced to screen readers
5) Accessible complex components
Modals should trap focus while open
Esc should close the modal when appropriate
When closing a modal, focus should return to the opener
Menus and dropdowns should be keyboard navigable and announced correctly
Simple example: semantic HTML matters
Accessible button
<button type="button" aria-label="Close dialog">✕</button>
Less accessible version
<div onclick="closeDialog()">✕</div>
A div does not behave like a button by default. In most cases, the best fix is simply to use a real button.
Simple example: input + label + error message
<label for="email">Email</label>
<input id="email" name="email" type="email" aria-describedby="emailError" />
<p id="emailError" role="alert">Please enter a valid email.</p>
This improves usability for everyone and ensures screen readers can correctly describe the field and its error message.
Final thought
Accessibility is about building interfaces that work for more people, in more situations, with less friction. Most accessibility improvements also make your product better for all users. If you build accessible components from day one, you avoid painful rewrites later.