Skip to content

ADR: Keyboard and screen reader

ADR: Keyboard and screen reader

Status
accepted
Date
2026-09-03
Shipped as
1.0.0.36

The README listed this as open work: "focus management on view switches (the detail page should receive keyboard focus), plus a fuller accessibility audit."

In plain words

This page makes the site work for people using a keyboard or a screen reader instead of a mouse. A hidden link on the first Tab jumps straight past the sidebar (a skip link). Focus now moves to each new view as it opens, and a hidden line tells a screen reader what changed (a live region).

What that is worth: a developer has browser tests that fail if a change breaks the keyboard path, and the organization's site can be used end to end by a visitor who never touches a mouse.

Context

The app was already better than its starting point in the parts a component library gives you for free. The palette clears WCAG AA on both grounds and a test asserts every pair (ADR: The palette). The sidebar's drawer is a native <dialog>, so focus trapping, the backdrop, and Escape are the browser's job rather than a hand-rolled approximation. Icons are aria-hidden, icon-only buttons carry labels, and the document rows mark the open one.

Three things were still wrong, and all three are the same kind of wrong: they are invisible to a mouse.

Nothing moves focus when the view changes. Clicking a tile replaces the grid with the detail page. The tile that had focus no longer exists, so focus falls to <body>: the next Tab starts over at the top of the document, and a screen reader announces nothing, because from its point of view nothing happened. Back to the list, and into the Admin tab, behave the same way.

The rail is thirty buttons deep. Every document, every record, the Admin link. A keyboard user reaches the vehicle grid by tabbing past all of it, and does it again after every view change, because of the paragraph above.

Filtering is silent. Narrowing a hundred thousand vehicles to eleven rerenders the grid and says nothing. A sighted user reads the count in the filter bar; nobody else is told it changed.

Decision

A skip link, first in the tab order. Visible only while focused, which is the whole convention: a mouse user never sees it, a keyboard user finds it first. It is positioned off-screen rather than display: none, because a display: none element cannot take focus and the link would do nothing.

Focus follows the view. <main> carries tabIndex={-1}, which makes it focusable by script and never by Tab, and an effect moves focus there when the view identity changes: list, a specific vehicle, or the Admin tab. It fires on change only, never on first paint, because the browser's own initial focus is correct. preventScroll is passed because the scroll-restore effect already decides where the page sits, and the two otherwise fight.

A polite live region says what changed. One visually hidden role="status" paragraph, whose text is derived from the same state the view is: the vehicle's name on the detail page, the match count on the list, the loading and error states in between. Polite by definition, so it waits for a pause rather than interrupting.

In the code

The focus effect, keyed on view identity rather than on any one piece of state (src/app/hooks/useNavigation.ts and src/app/Shell.tsx):

// A single-page app swaps the view without changing the document, so the
// browser has nothing to move focus to. Open a vehicle from a tile and the
// tile is gone: focus falls to <body>, the next Tab starts from the top of
// the page, and a screen reader announces nothing at all. Moving focus to
// the region that just changed is the standard repair, and it is why <main>
// carries tabIndex={-1}: focusable by script, never by Tab. It is found by
// its id (MAIN_ID, which Shell.tsx gives it), the same id the skip link names.
const viewKey = viewKeyOf(view);
const lastView = useRef(viewKey);
useEffect(() => {
  if (lastView.current === viewKey) return;
  const arrivedByItself = address.deepLinkPending.current;
  lastView.current = viewKey;
  // A deep-linked vehicle resolving is data arriving, not a view the visitor
  // chose. Moving focus for it yanks a screen reader's cursor mid-sentence
  // seconds into the page, and pulls a keyboard user off the skip link.
  if (arrivedByItself) return;
  // preventScroll because the effect below already decides where the page
  // sits; without it the two fight and the detail opens part-scrolled.
  document.getElementById(MAIN_ID)?.focus({ preventScroll: true });
}, [viewKey, address.deepLinkPending]);

Live from src/app/hooks/useNavigation.ts, region focus, read from this build at 99df7a8.

The announcement, derived rather than pushed, so it cannot go stale:

const announcement = announcementOf(view);

Live from src/app/hooks/useNavigation.ts, region announcement, read from this build at 99df7a8.

The link itself, and the element it targets:

{/* First in the tab order on purpose. The docked rail is around thirty
    buttons, and without this a keyboard user tabs every one of them to
    reach the grid, on every page view. Hidden until it has focus. */}
<a className={styles.skipLink} href={`#${MAIN_ID}`}>
  Skip to content
</a>

Live from src/app/Shell.tsx, region skip-link, read from this build at 99df7a8.

The two rules that make a hidden thing audible and a focused thing visible (src/app/App.module.css):

/* The skip link is present in the tab order at all times and visible only
   while it holds focus, which is the whole convention: a sighted mouse user
   never sees it, a keyboard user finds it first. It is positioned rather than
   hidden with display:none, because a display:none element cannot be focused
   and the link would do nothing. */
.skipLink {
  position: absolute;
  left: var(--space-3);
  top: -3rem;
  z-index: var(--layer-skip);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: top var(--transition-fast);
}

.skipLink:focus-visible {
  top: var(--space-3);
  outline: var(--focus-ring-on-dark);
  outline-offset: var(--focus-ring-offset);
}

/* Visually hidden, still announced. Not display:none, which removes it from
   the accessibility tree along with the layout. */
.srOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Script moves focus here on every view change, and a focus ring drawn around
   the whole page would be noise. The ring stays on the controls that earn it. */
.main:focus {
  outline: none;
}

Live from src/app/App.module.css, region a11y, read from this build at 99df7a8.

Consequences

  • Tab from a cold load reaches "Skip to content" first, then the rail. The order is deliberate: the link is the escape hatch, so it comes before the thing it escapes.
  • Opening a vehicle, going back, and opening Admin each move focus to the new view and announce it. The Playwright suite asserts all three, because focus is exactly the kind of behaviour that a refactor breaks silently.
  • The live region adds a paragraph to the DOM that no sighted user will ever see. That is the cost of the feature and it is the right cost.
  • Still open: a full audit with an actual screen reader, which is a person's job and not a checklist's. The keyboard path is now walkable end to end, which is the part a test can hold.

Where it sits

Everything here is front end: the skip link and the live region live in src/app/Shell.tsx, and the focus effect and the announcement text live in src/app/hooks/useNavigation.ts. Single responsibility fits at the hook level: useNavigation owns both where focus goes and what a screen reader hears, and because the announcement is derived from view state there is no second copy to go stale. The price is a hidden paragraph in the DOM that no sighted visitor sees, plus browser tests to keep the path walkable. An audit with a real screen reader is still open, and what it finds could push this work into components the hook does not reach.

Files

Enforced by

Not machine-checked. Held by review.

Store

The Yard, home

Steven StoutStaff .NET engineerRemote

Production .NET that stays up. Built with AI, measured on every version.

Steven Stout

Hi, I'm Steve. I build the systems that make delivery boring in the best way, then coach people inside them.

  • 200+

    production releases, none took the platform down

    Conway Investment Research, 2019 to 2024. Sole engineer for the first three years on a live financial advisory platform.

    See how
  • 50%

    shorter release cycle

    Storee Construction, 2024 to 2026. Four ASP.NET applications onto one .NET 10 platform on Azure, with a four-person team I hired and mentored.

    See how

01Verified

Steven Stout

A real person, and the work is mine.

  • Identity

    Checked by LinkedIn, not by me.

    LinkedIn verified my government ID.

  • Running system

    You are looking at it.

    Version 1.0.5.273 is live. Nothing ships unless it passes the automated gates first.

That's who I am. Here's how I work.

02Strengths

Ten strengths, each with the proof beside it. The numbers match my resume and LinkedIn, and the live ones are read from this site as you look.

  • 01

    Keeps production alive

    200+ releases on a live financial platform, and none took it down. Sole engineer for the first three years.

    See the Conway work

  • 02

    Simplifies messy systems

    Four ASP.NET applications onto one .NET 10 platform on Azure, and a release cycle 50% shorter.

    See the Storee work

  • 03

    Marries dev and infrastructure

    Blue-green releases at Storee that flipped in about 5 seconds with nobody signed out, and Azure Front Door at two employers.

    See this site's cloud

  • 04

    Designs data that holds up

    White-label clients on one shared database, the isolation built into the data, and no cross-client issues.

    See the Conway work

  • 05

    Keeps AI-written code honest

    15 quality numbers that may only improve: 273 releases in a row with none worse.

    See the quality numbers

  • 06

    Resourceful

    $30,000+ cut from Azure and vendor spend at Conway. This site's Azure bill is public, resource by resource.

    See the bill

  • 07

    Builds people up

    Hired and mentored a four-person team. 13 colleagues recommend me by name.

    Read the recommendations

  • 08

    Takes ideas to production

    This site: designed, built and run solo, with 352 versions measured through one gate.

    How it was built

  • 09

    Writes clearly

    Posts on real engineering problems, in plain words.

    Read the blog

  • 10

    Owns decisions

    153 decision records, each with its tradeoff and the call I made.

    See the decision records

Built with AI. Gated so quality never slides.

Steven Stout’s showcase: a used-vehicle auction on .NET and React, built and run by one engineer, live on Azure, with its decisions written down.

No quality number has gotten worse at any release since 1.0.5.1 on 10 November: 273 releases in a row.

One engineer, an AI agent and a gate that checks 15 quality numbers on every release. 352 versions measured, with every result public, the worst days included.

82 releases in the last 7 days, each through the same gate.

Async methods with no CancellationToken, may only fall

11091.0.3.1391.0.5.2731.0.4.115, the ratchet
Every number, on the Quality page

TheYard, right nowLive

Answering in

unread

02505007501,000

server time at p95, the usual five minutes of the last day.

Azure this month

unread

the bill, by resource, read from Azure. The Admin tab shows every line.

Since the last roll

unread

 

rolled in place by the pipeline, behind one gate.

People who have visited

unread

30 days agotoday

Scanners, my own tools' and my own reads left out.

03Start here

04Where teams are heading

How I see engineering with AI, and the setup on this site that backs it.

AI-augmented teams · Architecture and ownership

AI writes more of the code. Someone still has to own what ships.

Teams are going to be heavily AI-augmented. That moves the senior job toward architecture and technical ownership: deciding what to build in pieces small enough to verify, and owning what ships.

  • Task tracking will get automated too. Judgment stays human: seeing a design fail at scale before it does.
  • On this site the AI's first design held the whole catalogue in memory. I caught it when the App Service plan hit 82 per cent and moved the work to the store.

What the AI wrote, what I decided

07Tech stack

  •    
  •    
  •    

Read from the build, never typed by hand

What TheYard runs on

What we use, where it runs, its AWS twin, the version as built, and the file that proves it.

Cloud patterns, not one vendor: every Azure piece in this stack has a named AWS twin. Mapped, not yet run on AWS.

  • .NET 1114 projects
  • React 19.3TypeScript 7.0
  • Azure9 Bicep files
  • 11GitHub Actions workflows
The whole stack, with the file that proves each line

The last release the gate stopped was 1.0.5.258 on 2 December, at its browser 1 of 2 job.

08How it is built

09How it is run

10Who and why

Next step

11What has to work, where is it today, and what does success look like?

Book 20 minutes opens an email to me with those three questions in it, and I answer with a time.

Book 20 minutes

Your email app should have opened with this message. If it did not, copy it and send it from any mailbox.

Or message me on LinkedIn