Most small business websites are built to look good in a design review. Far fewer are built so that every visitor can actually use them. A customer using a screen reader, someone navigating with only a keyboard, or an older visitor who zooms the page to 200 percent should all be able to find a phone number, read a service page and submit a quote request.
Accessibility is not a separate project you bolt on at the end. In a Next.js app, most of it comes down to habits: semantic HTML, sensible focus handling, labeled form fields and enough color contrast. This post walks through the checks we run on every client build, with code you can drop into an App Router project today.
Why this matters for a local business site
For a plumber, dentist or law firm, the website has one job: turn a visitor into a call, a booking or a form submission. Every accessibility problem is a point where a real person gets stuck and leaves.
There is also a practical overlap with search and mobile usability. Clear headings, descriptive link text, proper alt text and readable layouts help search engines understand the page and help phone users get through it quickly. If you already work through a mobile friendly website checklist, many of the fixes below will feel familiar.
1. Start with semantic layout
Screen readers rely on landmarks to let users jump around a page. A div soup gives them nothing to work with. In your root layout, use real elements:
// app/layout.tsx
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
<a href="#main" className="skip-link">Skip to main content</a>
<header>
<nav aria-label="Main">{/* links */}</nav>
</header>
<main id="main">{children}</main>
<footer>{/* contact info, hours */}</footer>
</body>
</html>
);
}
Two details are easy to miss here. First, the lang attribute on the html element tells assistive technology which language to pronounce. Second, the skip link lets keyboard users bypass the navigation on every page. Style it so it is hidden until focused:
.skip-link {
position: absolute;
left: 1rem;
top: -3rem;
padding: 0.5rem 1rem;
background: #111;
color: #fff;
z-index: 100;
}
.skip-link:focus {
top: 1rem;
}
2. Use one h1 and a logical heading order
Each page should have a single h1 that says what the page is about, followed by h2 and h3 elements in order. Do not pick heading levels for their font size. If a design calls for a small heading, keep the correct element and change the styling.
A quick way to audit this during development is to log every heading on the page from the browser console:
[...document.querySelectorAll("h1,h2,h3,h4")].map(h => h.tagName + " " + h.textContent.trim())
If the output reads like a sensible outline of the page, you are in good shape. If it jumps from h1 to h4, or has three h1 elements, fix the markup.
3. Write alt text that does a job
The Next.js Image component requires an alt prop, which is helpful, but it does not check whether the text is useful. A few rules we follow:
- Informative images get a short description of what matters:
alt="Technician replacing an outdoor AC condenser". - Decorative images get an empty string so screen readers skip them:
alt="". - Logos used as a home link describe the destination:
alt="CodeHunterz home". - Never stuff keywords into alt text. It reads terribly aloud and does not help rankings.
import Image from "next/image";
<Image
src="/team/install.jpg"
alt="Technician installing a new furnace in a basement"
width={800}
height={533}
/>
4. Label every form field
Lead forms are where accessibility problems cost the most. A placeholder is not a label. It disappears as soon as the user starts typing, and many screen readers do not announce it reliably.
<form action={submitLead}>
<label htmlFor="name">Full name</label>
<input id="name" name="name" autoComplete="name" required />
<label htmlFor="phone">Phone number</label>
<input id="phone" name="phone" type="tel" autoComplete="tel" required />
<label htmlFor="message">How can we help?</label>
<textarea id="message" name="message" rows={4} />
<button type="submit">Request a quote</button>
</form>
Notice the autoComplete attributes. They let browsers fill in details automatically, which helps everyone and especially users with motor impairments. The type="tel" input also brings up the number pad on phones.
Announce errors and success
When validation fails, the user needs to know what went wrong and where. Tie the error message to the field with aria-describedby and mark the field invalid:
<label htmlFor="email">Email</label>
<input
id="email"
name="email"
type="email"
aria-invalid={!!errors.email}
aria-describedby={errors.email ? "email-error" : undefined}
/>
{errors.email && (
<p id="email-error" className="field-error">{errors.email}</p>
)}
For the overall result, render a status region so screen readers announce it without the user hunting for it:
<div role="status" aria-live="polite">
{state.success ? "Thanks, we received your request and will call you soon." : null}
</div>
5. Keep focus visible and predictable
Many CSS resets remove the focus outline because designers dislike it. That leaves keyboard users with no idea where they are. Instead of removing it, style it with focus-visible so it only shows for keyboard navigation:
:focus-visible {
outline: 3px solid #2563eb;
outline-offset: 2px;
}
Then test the whole page with only the Tab, Shift+Tab, Enter and Space keys. You should be able to reach every link, open the mobile menu, close it, and submit the form. Watch for these common traps:
- A mobile menu built with a div and an onClick handler. Use a button with aria-expanded instead.
- Modals that let focus escape behind them, or that do not return focus to the trigger when closed.
- Carousels that auto rotate with no pause control.
Here is a minimal accessible menu toggle:
"use client";
import { useState } from "react";
export function MobileNav() {
const [open, setOpen] = useState(false);
return (
<>
<button
type="button"
aria-expanded={open}
aria-controls="mobile-menu"
onClick={() => setOpen(o => !o)}
>
Menu
</button>
<ul id="mobile-menu" hidden={!open}>
<li><a href="/services">Services</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</>
);
}
6. Announce route changes
In a client side routed app, moving between pages does not trigger a full page load, so screen readers may not notice the change. Next.js includes a built in route announcer that reads the new page title, so make sure every route exports a unique, descriptive title through the Metadata API:
// app/services/ac-repair/page.tsx
export const metadata = {
title: "AC Repair Services | Example Heating and Cooling",
description: "Same day AC repair for homes and small offices.",
};
This also happens to be good technical SEO, so it is worth doing for both reasons.
7. Check color contrast and text sizing
Light gray text on a white background looks elegant in a mockup and is unreadable in sunlight on a phone. The WCAG guideline for normal body text is a contrast ratio of at least 4.5 to 1, and 3 to 1 for large text. Browser DevTools show the ratio when you inspect a text element, so check your brand colors early.
For sizing, use rem units for font sizes so text scales when users change their browser settings, and test the page at 200 percent zoom. Content should reflow without horizontal scrolling or overlapping elements.
8. Make links and buttons say what they do
"Click here" and "Learn more" are meaningless when a screen reader user pulls up a list of links on the page. Write link text that makes sense on its own, such as "See our AC repair pricing" or "Call (your number) for emergency service".
Use the right element for the job, too. Links navigate to another URL. Buttons perform actions on the current page. Click to call links should be real anchors with a tel: href so they work everywhere:
<a href="tel:+15555550100">Call now for same day service</a>
9. Automate what you can
Manual testing catches the most important problems, but automated checks stop regressions. Two lightweight options for a Next.js project:
- eslint-plugin-jsx-a11y, which ships with the default Next.js ESLint config through eslint-config-next, catches missing alt text, unlabeled controls and invalid ARIA at lint time.
- Running Lighthouse or axe in the browser on key templates (home, service page, contact page) before each release.
You can also wire axe into Playwright tests so a pull request fails if a new accessibility violation appears:
import { test, expect } from "@playwright/test";
import AxeBuilder from "@axe-core/playwright";
test("contact page has no detectable a11y violations", async ({ page }) => {
await page.goto("/contact");
const results = await new AxeBuilder({ page }).analyze();
expect(results.violations).toEqual([]);
});
Automated tools find only part of the problems, so keep the keyboard and screen reader walkthrough in your release checklist.
A short release checklist
Before you ship a small business site, run through this list:
- html has a lang attribute, and there is a working skip link.
- Each page has one h1 and a logical heading outline.
- Every meaningful image has useful alt text, and decorative images use an empty alt.
- Every form field has a visible label, errors are announced, and success messages use a live region.
- Focus is visible, and the full page works with only a keyboard.
- Every route has a unique title.
- Text meets contrast guidelines and the layout survives 200 percent zoom.
- Links and buttons describe their purpose.
- Lint rules and an automated scan run in CI.
None of these items require a redesign or a large budget. They are mostly small decisions made correctly the first time. When we build client projects through our Next.js development service, this list is part of the definition of done, not an optional extra.
If you are responsible for an existing site and are not sure where it stands, a quick outside review is a good place to start. You can request a free website audit that covers usability, speed and SEO basics, and then work through the fixes in order of impact.
Accessible sites are easier to use, easier to maintain and better at turning visitors into customers. That is a good trade for a few extra attributes in your JSX.
CodeHunterz Team
Top comments (0)