Building Accessible Interfaces by Default
· 21 min read
Accessibility stays cheap when semantics, focus, contrast, and motion are defaults in your component library—not a pre-launch audit. Ship interfaces where structure, keyboard paths, and announcements match what sighted pointer users see, then prove it with automated checks plus real assistive-tech journeys.
Accessibility is product quality, not a checkbox
Teams often schedule an accessibility pass after visual design and feature freeze. By then, heading hierarchy, color tokens, focus order, and custom widgets are baked into dozens of screens. Retrofits cost multiples of getting the default right in shared components.
Accessible product quality means the same information and actions remain available across keyboard, screen reader, switch control, voice control, zoom, high contrast, and noisy mobile environments. Those constraints frequently improve clarity for every user—especially under stress, sunlight, or one-handed use.
For freelance MVPs shipping Expo and Next.js together, treat accessibility as a release criterion alongside auth and payments. A store rejection or enterprise procurement blocker tied to WCAG gaps can delay revenue longer than an extra sprint on shared primitives.
Document which user journeys must pass keyboard-only and screen-reader smoke before merge. Product, design, and engineering should share that list so scope debates do not silently drop non-visual requirements.
| Signal | Treat as quality | Treat as compliance theater | | --- | --- | --- | | Shared Button has name + role | Yes | — | | One marketing page fixed post-audit | Partial | If components unchanged | | axe green but focus lost in modal | No | Green CI without journey tests | | Design tokens meet contrast in dark mode | Yes | Light theme only |
Accessibility debt compounds like performance debt: each new feature copies the last broken pattern until refactors require touching every route.
Start with native semantics before ARIA sprinkles
Use headings for document structure, `button` for actions, `a` for navigation, `label` for controls, and list elements for related items. Native elements inherit platform keyboard behavior, roles, and expectations that custom `div` stacks must reimplement—and often reimplement incorrectly.
Reach for ARIA to describe relationships and live state, not to repair wrong elements. A `div` with `role="button"` still needs tabindex, keyboard handlers, and disabled semantics you get free on `button`. Prefer composition: style native elements rather than cloning behavior.
On React Native and Expo, set `accessibilityLabel`, `accessibilityRole`, and `accessibilityState` on interactive views. Group related content with headings so VoiceOver and TalkBack announce context, not a flat list of "Button."
Icon-only controls need visible text somewhere—or a concise accessible name. Placeholders are not labels; associate `TextInput` with persistent labels in React Native and HTML alike.
Preserve a logical heading order even in marketing pages. Skipping levels for typography creates a confusing outline for screen-reader users navigating by headings.
Do not encode meaning through color alone. Pair hue with text, icon, or pattern for errors, required fields, and chart series. Verify states: hover, focus, disabled, and invalid—not only default.
Keyboard and pointer parity on web
Every pointer action should have a keyboard equivalent unless the interaction is inherently path-based (freehand drawing). Tab order should follow reading order; avoid positive tabindex except in rare managed widgets.
Show a visible focus indicator that survives brand themes. Removing outlines for aesthetics without a replacement fails WCAG and frustrates power users. Use `:focus-visible` so mouse users are not flooded while keyboard users still see position.
Implement skip links to main content on multi-section marketing layouts. They are cheap in Next.js and save dozens of tab stops on every visit.
For composite widgets—tabs, menus, comboboxes—follow established patterns from WAI-ARIA authoring practices. Inventing key maps per page breaks muscle memory and assistive-tech heuristics.
Test tab traps carefully: modals should contain focus; side drawers that behave as non-modal panels should not steal focus from the underlying page unless product requires it.
Document expected keys in Storybook or component docs so QA and contributors do not regress behavior silently.
Manage focus when the UI changes
Single-page navigation, dialogs, drawers, and toasts change context without a full document load. Move focus intentionally to the primary heading or first control in the new surface so keyboard and screen-reader users know where they landed.
When a modal closes, restore focus to the element that opened it. Losing focus to `body` disorients users and forces them to tab from the top of the page again.
Use live regions sparingly. Announce async success, failure, or validation summary—not every spinner tick. `aria-live="polite"` beats aggressive `assertive` unless the user must act immediately for safety.
Route transitions in Expo Router should update screen titles and focus parallel to visual animation. If you animate a screen swap, provide a reduced-motion path that still updates focus when the new screen mounts.
Avoid autofocus on every page load for marketing sites; on authenticated task flows, autofocus the primary field only when it does not steal focus from global skip navigation.
Long forms should surface inline errors linked with `aria-describedby` so assistive tech reads the message with the field, not as disconnected text below the fold.
Respect visual and motion preferences
Text and controls need sufficient contrast in light and dark themes, including placeholders, borders, disabled states, and subtle secondary actions. Test with a contrast checker on real tokens, not guessed hex values from Figma exports.
Support zoom and text scaling without clipping primary actions. Responsive layouts should wrap labels instead of truncating critical words at 200% zoom.
Honor `prefers-reduced-motion`: replace large parallax or page transitions with instant or opacity-only changes that preserve orientation. Never hide essential instructions inside animations that cannot be read when motion is reduced.
On mobile, respect system font scaling. React Native `Text` should use flexible layouts so enlarged text reflows instead of overlapping touch targets.
Charts and data visualizations need textual summaries or tables for critical values. Color alone cannot be the only channel for "good vs bad" metrics in dashboards you ship to clients.
Video and autoplaying carousels should respect muted defaults and provide pause controls reachable by keyboard. Autoplay with sound is both an accessibility and a conversion problem.
Expo and React Native accessibility patterns
Mobile accessibility is not "add labels later." Set `accessibilityLabel` when visible text is insufficient, and use `accessible={false}` on decorative icons so they are skipped.
Touch targets should meet platform guidance—roughly 44×44 density-independent pixels—especially for primary actions in thumb reach. Padding beats tiny hit slugs with invisible overlays.
Test with TalkBack on Android and VoiceOver on iOS on real devices, not only simulators. Focus order on native stacks differs from web; verify nested touchables do not create double announcements.
For React Native Web hybrids, do not assume web semantics propagate automatically. Explicit roles and labels on shared components keep parity across targets.
Expo Router headers and tabs should expose readable titles. Dynamic routes need stable accessibility labels when titles load asynchronously—show a skeleton announcement or defer focus until content is ready.
Haptics and sound are optional enhancements; never rely on them as the only confirmation of payment or deletion.
Encode defaults in the design system
Fix accessibility once in `Button`, `Input`, `Modal`, and `Link` primitives so product routes inherit correct behavior. Storybook stories should include keyboard interaction notes and axe results in CI.
Pair design tokens for foreground, background, and focus ring together. Changing brand purple without updating `focusRing` regresses WCAG silently across the app.
Form patterns should bundle label, hint, error, and `aria-invalid` wiring. Product teams should not re-decide association per screen.
Document "do not use" examples: clickable `div` cards without keyboard support, headings chosen for font size, tooltips as sole explanation for icon buttons.
When AI-generated UI appears in MVPs, run the same component review as human-written JSX—models frequently emit unlabeled inputs and div-buttons.
Align with your content/i18n glossary so accessible names stay consistent across locales; do not concatenate translated strings in ways that scramble announcement order for RTL or CJK locales later.
Test with automation and assistive technology
Run axe or equivalent rules in CI on key templates: home, contact, auth, checkout, and one dense dashboard. Fail builds on serious violations, not only warnings you never read.
Automated tools catch missing names, invalid roles, and many contrast failures. They cannot judge whether focus movement tells a story, whether screen-reader phrasing is concise, or whether a four-step funnel is cognitively exhausting.
Schedule manual passes: keyboard-only navigation, VoiceOver on iOS, TalkBack on Android, 200% zoom, and high-contrast mode. Include disabled users or accessibility specialists when budget allows—the findings generalize to components.
File bugs against the design system when a defect repeats across routes. One-off page patches recreate the same audit cost next quarter.
Before App Store or Play submission, walk the binary build—not only Expo web—so native accessibility props are present in production bundles.
Track accessibility defects in the same backlog as functional bugs with severity, not a separate forgotten spreadsheet.
When you fix a repeated defect in the library, add a regression test that fails if the accessible name disappears—similar to snapshot tests for visual regressions.
Operational checklist before you call it accessible
Before launch: verify heading outline on top templates, run axe on CI artifacts, complete keyboard path for signup and pay flows, confirm modal focus trap and restore, validate dark-mode contrast on form errors, and test reduced-motion paths.
Before handing off an MVP: document known gaps with remediation owners, link to component library versions that passed audit, and add regression tests for critical names and roles.
After incidents—support tickets about "cannot complete form with screen reader"—add a journey test or lint rule so the class of bug cannot return unnoticed.
Freelance engagements should clarify WCAG target level and browsers or assistive pairs in scope. Promising "fully accessible" without test matrix invites mismatch at acceptance.
Link accessibility work to hiring pages and case studies only with honest scope; cite real patterns you ship (semantic forms, CI axe), not unverified audit scores.
Revisit the checklist after major redesigns: token changes, new navigation patterns, and third-party embeds (chat widgets, payment iframes) are common regression sources that automated scans only partially cover.
Ship a one-page a11y README for the repo: which journeys are in scope, how to run axe locally, and who owns triage when CI fails—so the next contributor does not guess.
Frequently asked questions
Which WCAG level should an MVP target?
Can ARIA fix a div that acts like a button?
Is testing Expo web enough for mobile accessibility?
Is automated axe testing enough?
Sources
- WCAG 2.2 Quick Reference — W3C
- React — Accessibility in common components — react.dev
- React Native — Accessibility — reactnative.dev
- WAI-ARIA Authoring Practices Guide — W3C
Related on this site
Related service
Mobile application development
iOS/Android mobile products with production architecture, store readiness, and backend integration.
Published on March 27, 2024 by Berktug Berke Ates.