Skip to content

HTML Accessibility: Markup Choices and a Practical QA Plan

Connect semantic markup to the behavior people need. A practical guide to buttons, labels, focus and a repeatable accessibility observation record.

By , founder and engineerPublished 15 min read

Choose meaning. Check behavior: native HTML elements, keyboard interaction and recorded retest evidence.
Editorial illustration

A control can look correct and still be difficult to identify or operate. A styled text block might resemble a button without accepting keyboard input. A form can show a visible error while leaving someone using a screen reader without enough information to correct it.

The useful question is whether a person can understand the page, reach its controls and complete the intended task. That requires examining the delivered page and its changing states, alongside the underlying markup. This guide follows those decisions through a hypothetical quote-request journey. The examples and worksheet provide review instructions, not completed tests or a conformance statement.

What should an HTML accessibility review cover?

Define the task before choosing checks. For a quote request, the task might start with understanding a service and end with an understandable confirmation. The form's fields are only part of that journey. The route to the form, instructions, validation and response all affect whether someone can proceed.

Record the page or component, the version being reviewed and the states included. A review of the initial page says little about an error message that appears after submission. A shared header also needs attention where it behaves differently, such as when its navigation collapses on a narrow screen.

Separate implementation from verification. A developer may have added labels and focus styling without checking the finished behavior. Describe those features as implemented until the agreed check supplies evidence about how they work. Similarly, a prototype can show the intended confirmation without sending anything to a real destination.

Agree these boundaries while planning the content and prototype, so reviewers know what they can inspect and which dependencies remain open. Keep legal requirements and formal conformance evaluation outside a casual launch checklist. A small review can produce useful findings without supporting a claim about every page, disability or assistive technology.

How do you choose between native elements and custom controls?

Choose the element by its job. A link with a destination supports navigation. A button performs an action, such as opening a dialog or submitting a form. Their appearances can be similar, but their expected behavior differs. Avoid selecting an element solely because its default styling is convenient.

Native buttons support keyboard activation with Enter and Space. A generic container styled to look like a button does not acquire those behaviors from its appearance. Adding a button role communicates a role, but the developer still needs to supply the appropriate interaction behavior for that custom control.

For an ordinary action, a native button usually leaves less behavior to recreate. Give it an appropriate type in a form: a control that opens help should not accidentally submit the quote request. A navigation link should lead somewhere meaningful even when its visual treatment resembles a pill or card.

Inspect the control's name and resulting action together. A visible label such as Request a quote should lead to the expected next step. If an action opens a dialog, review focus entry and closing. If it recalculates information in place, moving focus away may be unnecessary. Select the behavior that fits the task, then verify it.

Custom widgets can be necessary, but they require a more detailed interaction specification. Define keyboard behavior, names, states and focus handling before accepting the visual implementation. Adding several accessibility attributes after a component is built is an unreliable substitute for those decisions.

How should headings and page structure communicate meaning?

Use headings to organize the content into meaningful sections. The page's main heading introduces its subject; subsequent headings describe the relationship between sections and subsections. Their wording should help someone decide where to go without reading every paragraph in sequence.

Keep the hierarchy separate from font size. A section can have a visually small heading while retaining the appropriate heading element. Conversely, making a paragraph large or bold does not turn it into a heading for people navigating by document structure.

When moving into a subsection, choose a rank that expresses the relationship. When that subsection ends, moving back to a higher rank can be appropriate. Avoid turning a simplified instruction about sequential headings into a claim that every jump in either direction is automatically a failure.

Group page regions according to their purpose. A navigation region contains navigation; the main content region identifies the principal page content. Do not turn every visual card into a new landmark simply because it has a border. Too many poorly distinguished regions can make the page harder to understand.

Review the generated page as well as the content editor. A heading that looks right in the CMS may be rendered with a different element. Check representative templates and repeated components so a local content correction does not leave the same structural problem elsewhere.

What makes a control name or image alternative useful?

A control's name should tell the person what it does. Visible text is often the clearest starting point. An icon-only control needs an understandable accessible name; the shape of a magnifying glass or cross should not be the only explanation available.

Inspect the name that the browser exposes rather than assuming a tooltip or nearby paragraph supplies it. Check whether the name still makes sense when the control is encountered outside the surrounding visual layout. Repeated links called More may need clearer context when several services appear together.

Choose image alternatives according to purpose. An informative image needs text that conveys the information relevant to the page. A decorative image generally uses an empty alt attribute so it can be skipped. Removing the attribute altogether can leave an unhelpful filename or other fallback for assistive technology to announce.

For a linked image or image-based control, explain the destination or action where that meaning is needed. Avoid repeating an icon's appearance when the control already has an adequate name. A decorative arrow next to Request a quote rarely needs its own spoken description.

A diagram may need more explanation than a short alternative can carry. Provide its important relationships in nearby accessible text, then use a concise alternative that identifies the diagram's purpose. Match the actual image, and do not insert a list of keywords or a test result the graphic never shows.

How do labels and instructions support a form?

Give each control a clear, persistent label. For an ordinary email input, an explicit label can connect to the input through matching for and id attributes. Make sure the identifier remains unique when a component is reused, such as when the same form appears in a page and a dialog.

Placeholder text can suggest an example, but it is a poor replacement for a label. It may disappear as someone types, leaving them to remember what the field requested. Visible labels also help people return to a partially completed form and check whether information belongs in the correct place.

Place instructions before the point where they are needed. Explain required fields and genuinely necessary formats. If a phone number accepts several reasonable formats, the instructions should not imply one arbitrary format is essential. Reduce avoidable requirements before adding increasingly elaborate error messages.

Where several options answer a shared question, provide a group description as well as individual labels. A fieldset and legend can express the relationship between related controls, including a set of radio buttons. The group name supplies context that an isolated option such as Yes cannot convey.

Check how required information and helpful hints are exposed to the selected assistive technology. Visual proximity alone does not establish a programmatic relationship. Keep the instructions concise enough to use, and distinguish information needed to complete the field from additional explanatory material.

What should happen when someone makes an error?

Validation should help the person recover. Identify the affected field, explain the problem in understandable language and provide a correction where one is known. Invalid entry is less useful than a message explaining that an email address needs a domain after the at sign.

Keep the explanation available while the person corrects the field. A red outline by itself does not identify the issue for everyone. Associate relevant error information with its control, and review how someone discovers it after submitting. A summary can help when several fields need attention, but it must lead to a usable correction path.

Preserve useful entered information where appropriate. Forcing someone to retype every field after one mistake increases the work needed to recover. Check which values remain and whether the form still explains the original request after returning from an error state.

Avoid interrupting people unnecessarily while they type. A message shown before a person finishes entering a value can be confusing. Decide when each check should run and how it should be presented, then test that timing as part of the interaction rather than treating validation as a separate decoration.

The review should include both expected input mistakes and an unavailable submission service. These are different problems. A field error asks the person to correct information; a server failure may require another route or a later attempt. The interface should make that distinction without pretending an unsuccessful request was received.

How do you preserve focus and keyboard operation after styling?

Move through the finished interface without a pointer and watch where focus goes. The focused control should remain identifiable against its actual surroundings. If the design replaces the browser's default focus indicator, the replacement needs to remain effective across the backgrounds and states where that control appears.

Check ordinary links and buttons as well as custom features. A hover effect says nothing about what a keyboard user can see. Focused, hovered, selected and disabled states may look different because they communicate different information; styling should not blur those distinctions.

Reaching a control is only the first check. Activate it with the appropriate key, inspect the resulting state and continue. A form submission, a menu expansion and a dialog opening require different follow-up observations. Record the behavior of the control rather than assuming a single key works identically for every widget.

Look for focus hidden behind persistent interface elements. A sticky header, cookie panel or floating contact bar can cover the location someone has reached. Review the affected viewport and scroll position instead of only checking the first screen at a large desktop size.

Use reverse navigation too. Moving backward through the interface can reveal a sequence or exit problem missed on the forward pass. For a modal dialog, review entry, movement within it, closing and the appropriate return location. A keyboard spot-check remains limited evidence; it does not establish that every assistive technology can use the component.

Must the visual order exactly match the document order?

The important requirement is a sequence that preserves meaning and operation. Several orders can be understandable. A simple row of independent cards may permit more than one reasonable reading order, while a multi-step form has dependencies that make its sequence much more important.

CSS can rearrange the visual layout without moving the underlying content. Compare what someone sees with the order encountered through keyboard navigation and the selected assistive technology. Investigate jumps that make a label, instruction or next step difficult to connect with the right control.

Avoid fixing one layout by assigning a long series of positive tabindex values. That creates a separate ordering system that can become difficult to maintain as content and shared components change. Start by correcting the underlying structure and layout relationship where possible.

Remember that static headings and paragraphs do not all become Tab stops. Keyboard navigation through interactive controls and screen-reader reading of the document are related but different activities. Review both when they are in scope, and name the method used in the evidence record. A claim that the page reads correctly needs more than a list of where Tab moved.

How should dynamic responses and hidden content be reviewed?

A page can change without navigating. A service choice may reveal extra questions, a quote form may display validation, or submission may replace the form with a confirmation. Each change needs an understandable path from the person's current position to the new information.

Choose focus movement deliberately. Sending focus to an error summary may help someone understand a failed submission, while a small status update may be better communicated without taking them away from the field. The correct approach depends on the interaction and the information being delivered.

Status announcements also need restraint. Announcing the same update repeatedly, or interrupting every keystroke, can make the form difficult to use. Verify what is exposed during the actual sequence and how often it is announced. Adding an announcement attribute does not establish that the overall message is understandable.

Check hidden and collapsed states. Content that is visually absent should not leave confusing controls in the navigation sequence. Conversely, instructions intentionally available to assistive technology need an implementation that preserves that access. Review the resulting behavior rather than relying on the CSS class name.

These decisions connect the interface to application behavior. In a project involving forms and application response states, assign responsibility for both the delivered message and the underlying outcome. A successful-looking screen must not be used as evidence that a request reached its destination.

How do you prepare a repeatable review?

Write a short scenario with a clear start and finish. Include the page address or build, browser and device, viewport, input method and any assistive technology used. Record enough detail for another reviewer to reproduce the same conditions without guessing which version was inspected.

Choose representative content. Long service names, substantial messages and several simultaneous errors can reveal problems hidden by short placeholder text. Use synthetic information in an agreed test environment so the review does not create real inquiries or expose personal details.

Separate the checking methods. Automated scanning can find certain detectable issues. Markup validation can identify structural problems. Keyboard navigation checks a particular way of reaching and operating controls. Screen-reader testing provides different observations about names, structure and announcements. Record each method actually used.

Prepare expected behavior before running the scenario. Otherwise, an unclear outcome can be rationalized after the fact. Decide what evidence would justify passing the check, what would count as a failure and what would leave the result blocked or unknown. A missing test environment or unavailable integration should remain visible as a limitation.

How would a quote-request journey be reviewed?

Consider a hypothetical service business whose website explains its coverage area and accepts quote requests. Its journey starts on a service page, continues through a form and ends with a confirmation. The example assumes an email field and a submit button; these are setup assumptions, not observations from a tested website.

Begin with the route into the form. Can the person identify whether the service suits their request and understand the action's destination? Continue through instructions, entry, an incomplete submission, correction and a valid submission. Follow the task in sequence so the review includes recovery and the final outcome.

The worksheet gives expected behavior and recording prompts. Keep actual observations and retest results in separate fields when copying it into an issue tracker. Do not replace an unknown result with the expected behavior. The diagram summarizes the review sequence and reports no completed checks.

Choose links or buttons, check visible focus and task completion, then record results and repeat after fixes.
Semantics: choose elements by purpose. Keyboard: check the journey. Retest: record the observed result after a fix.
Hypothetical quote-request worksheet. The last column gives recording prompts, not completed test results.
Control and actionExpected behavior and recording prompt
Link to the quote form: Reach the link and activate it with Enter.Its name explains the destination and the intended form opens. Record the destination reached and the retest outcome.
Email input and label: Reach the field; inspect its name and instructions with the selected assistive technology.The field’s purpose and relevant instructions are available. Record the name and instructions announced, then retest.
Visible focus styling: Move through the form without a pointer.The current control stays visible and the sequence follows the task. Record where focus becomes unclear and the retest outcome.
Submit button: Activate the focused button with Enter and Space in separate attempts.Both activate the intended action without an unintended navigation. Record the outcome of each key activation and the retest.
Validation error: Submit invalid information, find the error and correct the field.The problem and correction are understandable; the field remains reachable. Record how the error was found and corrected, then retest.
Confirmation state: Submit valid information and inspect the response.The outcome is understandable through the input and assistive technology being tested. Record how the response was presented and the retest outcome.
Hypothetical quote-request worksheet. The last column gives recording prompts, not completed test results.

Run the same scenario for each environment explicitly included in the review. A successful desktop keyboard pass cannot fill the result for a mobile screen reader. If a step is blocked by an unavailable service, record where the review stopped and what is still required.

What belongs in an actionable finding and retest record?

Describe the action and observed outcome precisely. Form inaccessible gives a developer little to reproduce. A useful hypothetical finding would say: after submitting an invalid email address, a visible error appears beside the field, but the selected screen reader does not announce it during the recorded journey. That sentence remains an example until someone observes it.

Keep evidence separate from an explanation of the cause. A screenshot may show an error beside a field; it cannot establish how that error was announced. A suspected missing association is a diagnostic hypothesis until the implementation and behavior have been checked.

Include the page and version, environment, reproduction steps, expected behavior, actual result and relevant supporting evidence. Name an owner and the next action. If there is no observation, mark the result untested. If the environment prevented the check, record the blocker rather than converting it to a pass.

After a repair, repeat the original steps and append the new result. Preserve the first finding so the record explains what changed. Then check a related path the repair could affect, such as a second error, a successful submission or closing and reopening the form. Closure should follow the agreed evidence, not merely the presence of a code change.

How should accessibility work be handed over?

Give the next person the scope, findings and remaining limits together. A list of fixed issues without the reviewed pages or environments can be mistaken for a statement about the whole site. Identify shared components, page-specific behavior and any areas that were unavailable during testing.

Preserve requirements when designs change. A new menu, revised form layout or replacement validation component can alter keyboard behavior and announcements. During a redesign of existing templates, include those interactions in the acceptance conditions rather than carrying forward an old pass without rechecking.

Content editors also need usable instructions. Explain which heading options belong to which levels, how to supply meaningful image alternatives and where form help text is maintained. A component can support accessible output while later content changes still make the page confusing.

A broader evaluation may require specialist expertise and participation from people who use relevant assistive technologies. Decide that scope according to the product and its users. This practical journey review helps produce actionable evidence; it does not replace a complete evaluation or guarantee conformance.

What is the next useful step?

Choose an important journey and identify the first unanswered behavior question. It might concern the submit button, the relationship between an error and its field, or what happens after a dialog closes. Assign a check and an owner, then record the result in the environment actually used.

Keep the outcome proportionate to that evidence. A passing check resolves the specific question it tested. Remaining pages, states and technologies still need their own coverage decisions. This makes progress understandable without turning a limited review into an unsupported claim.

For a website project, discuss the build and its review requirements so the scope includes the relevant journeys, responsibilities and handover evidence.