Five Low-Effort Accessibility Fixes You Can Ship Today
Full AA or AAA conformance is a long climb, but accessibility isn't all-or-nothing. Small, targeted changes to markup deliver real quality-of-life gains for many users — and they're often the first things worth checking when you inherit a codebase.
Let Navigation Say Which Page You're On
A distinct style for the active nav item is the usual cue, but it's purely visual. Low-vision users may not see the distinction at all. Adding aria-current="page" to the active navigation element makes the markup carry the same information as the design.
<a aria-current="page" href="/">Home</a>
As a bonus, you can drive the visual treatment from the attribute itself with a CSS attribute selector, keeping the two cues in sync.
[aria-current="page"] {
/* Active element styles */
}
Declare the Document Language
Visitors can usually infer a page's language or locale, but assistive technologies can't infer anything the markup doesn't state. Put the lang attribute on the <html> tag to announce both language and locale — worthwhile even for single-language apps.
<html lang="en-US">
In multilingual apps, the <html> element often isn't the only one needing a lang value. Set it on any element whose language diverges from the rest of the document, such as the links in a language toggle. Pair it with hreflang there so the link communicates its own language and that of its destination.
<a lang="fi" hreflang="fi" href="/" title="Suomeksi">
<bdi>Suomeksi</bdi>
</a>
Respect the Reduced Motion Preference
Motion adds polish, but it can be disorienting for some people. Windows and macOS both expose an OS-level setting that cuts motion system-wide; the prefers-reduced-motion media query lets apps honor the same setting through CSS, regardless of platform.
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
Killing all motion this way works, but leaves no room for nuance. Review what your users actually need and weigh alternatives:
- Animate only one property at a time under reduced motion. For a modal that fades and scales in via
opacityandtransform, transition onlyopacity— scaling causes more problems than fading. - Read the preference literally: remove motion (scaling modals, sliding drawers, bouncing notifications) while keeping color transitions on links and buttons.
Expose Table Sort State in Markup
Sort arrows on a table column are visual only. Setting aria-sort to ascending or descending on the actively sorted column's header lets assistive technology convey the same structure the arrow conveys visually.
<thead>
<tr>
<th>First Name</th>
<th aria-sort="ascending">Last Name</th>
</tr>
</thead>
Give Lazy-Loaded Lists a Size and Position
Infinite feeds and very long product lists often load lazily. Visual design can show progress through the list, but screen readers need markup: use aria-setsize for the total list length and aria-posinset for an item's index within it. If the total length isn't known, set aria-setsize to -1. Developers typically already have both values on hand.
<h2 id="top-artists-title">Top Artists of 2021</h2>
<ul role="listbox" aria-labelledby="top-artists-title">
<li role="option" aria-setsize="20" aria-posinset="5">Bloodbound</li>
<li role="option" aria-setsize="20" aria-posinset="6">Manimal</li>
<li role="option" aria-setsize="20" aria-posinset="7">Powerwolf</li>
</ul>
MacOS VoiceOver announces these attributes as follows.
Audit With the Axe DevTools Extension
These five fixes are a start, not an end — the space of assistive technologies and human ability is vast, and auditing alone can overwhelm. The Axe DevTools browser extension scans a page and lists issues and warnings grouped by approximate severity, highlights the offending element on the page or in the Elements tab, and links to background on each issue. Most usefully, it spells out clear, concise fixes. Accessibility work never really finishes — it evolves and needs maintenance like anything else on the web.




