Why HTML is the accessibility layer
Permalink:Imagine a page for a repair cafe. A visitor needs to find the hours, check what the cafe can fix, and sign up for a slot. One person might scroll and look for large text. Someone who uses a screen reader might ask for a list of headings and jump straight to "Hours." If the page uses a bold paragraph for "Hours," it may look like a heading, but that paragraph will not be in the screen reader's heading list.
Browsers interpret the elements that make up the page. They pass relevant information, such as a control's name and whether it is checked, to the tools that people use to access the page. This does not mean everyone hears the same words or uses the same commands. It does mean the same HTML can give several people the information they need to find a booking form, even if their tools work in different ways.
Start the repair cafe page with one clear h1 for the page title.
Use h2 for "Hours," "What we fix," and "Book a slot."
Use h3 under "What we fix" if you need separate parts for bikes and small appliances.
Pick the heading level from the way the topics fit together, not from the size of the letters.
Use CSS when the letters need to be bigger or smaller.
Put the page's main content inside main and the main navigation inside nav.
Keep the source order the same as the intended reading order.
For example, put the place and time before the booking form in the HTML, even if a wider layout puts the two side by side.
When the page is read aloud or shown in a single column, people should get the details before they are asked to act.
Semantics first, ARIA second
Permalink:Semantic HTML means choosing elements for what they do. A link takes someone to a new place, such as the booking page. A button performs an action, such as showing more dates on the current page. Both can be styled to fit your design, so their appearance need not decide which element you use.
A div styled to look like a button does not get a button's keyboard behavior or role for free.
Adding role="button" tells a screen reader what it should be, but does not make Space or Enter activate it.
Use a real button and give it a name that tells people what pressing it will do.
For a button inside a form, type="button" makes it clear that it should not submit the form.
<a href="hours.html">Repair cafe hours</a>
<button type="submit">Book a repair slot</button>
Give inputs visible labels and make each label's for match the input's id.
People can then click or tap the label, and a screen reader can tell them what to enter when they reach the field.
A hint inside the input does not replace a label.
The hint can disappear as soon as they type, right when they may need to check what the field asked for.
<label for="item">What needs fixing?</label>
<input id="item" name="item" required>
ARIA stands for Accessible Rich Internet Applications.
Its attributes fill gaps when the HTML does not carry enough information.
For example, an icon-only button that closes a panel can use aria-label="Close panel" to give it a name.
If the button already has visible text, use that text as its name unless there is a specific reason to add information.
Avoid labels that contradict what a person sees: someone who uses voice commands may try to speak the visible label to activate the control.
Keyboard and focus basics
Permalink:Load the page and put the mouse aside. Press Tab and watch which link or control has focus, meaning it will receive your next key press. Press Shift+Tab to move back. Use Enter for links, and try both Enter and Space on buttons. Then finish the whole booking task, including a run with a missing answer so you can see how the page handles an error.
Every stop needs a visible focus mark. Keep the browser's outline unless you provide a clear replacement. Check it against both light and dark parts of the page, not only against the background of the button. At a narrow width, look for sticky headers or banners that might cover the focused link. A focus ring is no help if you cannot see the control it surrounds.
For a page with repeated navigation, put a "Skip to main content" link before those controls. It can stay out of the way until it receives focus. When activated, it should put the reader at the main content so the next Tab continues there, rather than sending them back through the menu. Test that second Tab before you call the skip link done.
If a dialog opens over the page, focus needs to move into it.
People should be able to close it with the keyboard and continue from the button that opened it, if that button is still there.
A native modal dialog opened with showModal() handles much of the work, but you still need to choose a sensible first focus target and test how the dialog closes.
For a short optional note, a plain details disclosure may be a better fit than a dialog.
Testing tools that tell the truth
Permalink:Start with a keyboard pass and a narrow browser window. Zoom in and make sure headings, text, and controls reflow without losing information. For normal text, the Web Content Accessibility Guidelines (WCAG) 2.2 level AA call for a contrast ratio of at least 4.5 to 1 in most cases. Use a contrast checker on the actual text and background, and check that errors are marked with words rather than color alone. Try the booking link on a phone, too: it should be easy to tap without hitting another control.
Next run an automated checker such as axe or the accessibility audit in Lighthouse. It can catch some missing names and contrast failures, but a pass cannot tell you whether a link named "More" points to the right place or whether an error explains how to fix the form. Use the browser's accessibility inspector to check what role, name, and state a control exposes. Then try a real screen reader, such as VoiceOver on Apple devices or NVDA on Windows. Ask it for the headings and links, then listen to one full task from start to finish.
Keep notes a teammate can act on. "Tab from the date field; focus goes behind the banner and the Book button cannot be seen" is easier to fix than "keyboard broken." Write down the browser, the device or screen reader, and the first step that fails. After a fix, repeat the same steps in both directions and check the next control as well. This is a practical first pass, not proof that a site meets every WCAG 2.2 AA requirement.
Can ARIA make a custom control work by itself?
Permalink:No. ARIA can describe a role or state, but it does not supply keyboard actions or move focus for you. Start with a native control whenever one fits the job.
What our 2007-2009 archive predicted
Permalink:The ARIA test template from the 2007-2009 archive asked testers to record their setup and what actually happened. That is still a useful habit: separate what you expect from what a reader can do with the browser and tools they have.
Questions about how people would use web features also came up in the original mailing list discussion. Read it as a record of questions and tests from that time, then test today's page before relying on an old result. Practice choosing native elements with the guide to semantic HTML. For another exercise, return to the Learn HTML hub.