Select accessibility starts with a visible label, meaningful choices, and a value that matches what the form sends. Use a native HTML select for an ordinary dropdown, keep the browser's interaction, and test the empty, selected, and reset states before launch. A dropdown can look finished while accepting its prompt as an answer or submitting an internal value the server does not recognize.
This guide covers a conventional single-select field. A searchable custom combobox needs its own interaction design and testing; adding ARIA roles to a decorative dropdown does not provide that behavior.
Build select accessibility into native HTML
The following form asks a student to choose a project track. It has no default answer. The visitor must choose a track before opening a read-only preview.
<form id="project-options" action="/project-preview" method="get">
<label for="track">Project track (required)</label>
<p id="track-hint">Choose the track your project will be reviewed under.</p>
<select id="track" name="track" required aria-describedby="track-hint">
<option value="" selected>Choose a track</option>
<optgroup label="Web development">
<option value="frontend">Frontend website</option>
<option value="fullstack">Full-stack application</option>
</optgroup>
<optgroup label="Data">
<option value="visualization">Data visualization</option>
</optgroup>
</select>
<button type="submit">Preview project</button>
<button type="reset">Reset choices</button>
</form>
The label's for matches the select's unique id. The name identifies the field in submitted form data. The selected option's value supplies the answer, while its text identifies the choice to the visitor. Keep these responsibilities separate when wiring a reusable component. The HTML Standard's select definition describes the native control and its relationship to options and form submission.
Use optgroup when the categories help people navigate the choices. Give each group a meaningful label; repeating “Options” adds little information. Group labels organize choices and cannot be selected as answers. W3C demonstrates grouping items in select elements.
Keep the list short enough to understand. If a question has only a few choices that need comparison, consider visible radio options. If people need to search hundreds of items, first decide whether a searchable widget is necessary and budget for its additional interaction tests.
Fix a select-name finding at the label
Deque's select-name rule checks whether a select has an accessible name. An instruction above the control is not automatically its label. Inspect the reported select and verify the label association in the rendered DOM, especially when IDs are generated or the same form component appears twice.
A first option such as “Choose a track” is the current prompt, not the field's name. After selection, the visitor still needs to know what the field asks. Keep “Project track” visible and programmatically associated with the select.
Do not add an unrelated aria-label as a quick repair. It can override a useful visible label and produce a different name for assistive technology. The accessible name guide explains how to inspect that result. Use aria-describedby for supporting instructions, as in the example, rather than adding the entire hint to the field name. W3C explains explicit label associations and ARIA naming alternatives.
A conventional native select already exposes its semantics. Avoid adding role="menu" or a custom key handler to imitate a navigation menu. A choice of project track is form input; navigation links serve a different task.
Make the required placeholder option invalid
For the required single-select dropdown shown above, the first option has an empty value and sits directly inside the select. This is its placeholder label option. Leaving that option selected fails native required validation; choosing frontend or another real answer satisfies the requirement. The HTML Standard defines the placeholder conditions, including the single-line display and absence of multiple.
Three implementation mistakes are easy to miss:
- Giving the prompt a real value.
value="choose"can satisfy required validation even though no meaningful choice was made. - Putting the prompt inside an option group. It no longer has the same placeholder semantics.
- Removing the prompt while expecting a deliberate answer. In an ordinary single-select, the browser can select the first available option. A valid default may be appropriate, but choose that product behavior explicitly.
Keep the empty option enabled when visitors should be able to clear a selection. Some designs disable it after the first choice; test that decision against correction and reset needs. Do not apply this placeholder recipe unchanged to a multi-select listbox. Its selection and required behavior differ; MDN documents the select attributes and multiple-selection model.
Native validation helps the browser interaction. The server must still reject missing and unknown track values. If the application uses custom validation or novalidate, follow the accessible form errors guide to connect the error, preserve the answer, and provide a correction path.
Keep selection changes predictable
Changing an answer should not unexpectedly navigate away or submit the whole form. In the example, the visitor chooses a track and then activates “Preview project.” W3C's explanation of WCAG On Input says that changing a component's setting must not automatically change context unless the visitor was advised beforehand.
Updating a nearby price or filtering results can be appropriate without moving focus. Test whether that update is understandable and whether the selected value remains intact. If changing one select loads options for another, check the loading, empty, and failed states. Do not silently display a new first option as if the visitor selected it.
In a controlled React select, update the state from the change event and keep the value consistent with an available option. If a refresh removes the chosen option, show what happened and ask for a new choice. A field that jumps back to its old value or displays one answer while sending another needs a state fix, even if its label passes an accessibility check.
Test the native picker and narrow layout
Tab to the field, open it, move through choices, commit a choice, and leave it in both directions. Check how cancellation behaves. Repeat with the browsers and operating systems your audience uses: native picker presentation and key combinations vary. Follow the keyboard accessibility testing checklist for the surrounding focus path.
On a real phone, verify that the picker shows readable option text and that returning to the page preserves the answer. A desktop browser at a phone-sized viewport helps find layout issues, but does not reproduce a mobile operating system's picker.
Keep the native arrow and focus indicator visible. Start with restrained CSS rather than removing the default appearance:
#project-options select {
display: block;
box-sizing: border-box;
inline-size: 100%;
max-inline-size: 28rem;
min-inline-size: 0;
padding: 0.65rem;
font: inherit;
}
#project-options select:focus-visible {
outline: 3px solid #174ea6;
outline-offset: 3px;
}
Check the outline color against your page background. Test long option labels, zoom, and contrast themes. With a screen reader, verify the field label, description, required state, group context, and selected choice. Record the browser and assistive technology; a role assertion cannot establish what was spoken.
Add select accessibility regression checks
This Playwright test targets the exact form above on /project-options. Set RELEASE_ORIGIN to a safe test deployment. It checks the accessible name and hint, required validation, chosen value, form data, keyboard exit, and reset without submitting the form.
import { expect, test } from "@playwright/test";
const origin = process.env.RELEASE_ORIGIN ?? "http://localhost:4173";
test("project track keeps its label, value, and reset contract", async ({ page }) => {
await page.goto(new URL("/project-options", origin).href);
const track = page.getByRole("combobox", {
name: "Project track (required)", exact: true,
});
await expect(track).toBeVisible();
await expect(track).toHaveAccessibleDescription(
"Choose the track your project will be reviewed under.");
await expect(track).toHaveValue("");
expect(await track.evaluate((element) =>
(element as HTMLSelectElement).validity.valueMissing)).toBe(true);
await track.selectOption({ label: "Full-stack application" });
await expect(track).toHaveValue("fullstack");
expect(await track.evaluate((element) =>
(element as HTMLSelectElement).validity.valid)).toBe(true);
const values = await page.locator("#project-options").evaluate((element) =>
new FormData(element as HTMLFormElement).getAll("track"));
expect(values).toEqual(["fullstack"]);
await track.focus();
await page.keyboard.press("Tab");
await expect(page.getByRole("button", { name: "Preview project", exact: true }))
.toBeFocused();
await page.keyboard.press("Shift+Tab");
await expect(track).toBeFocused();
await page.getByRole("button", { name: "Reset choices", exact: true }).click();
await expect(track).toHaveValue("");
expect(await track.evaluate((element) =>
(element as HTMLSelectElement).validity.valueMissing)).toBe(true);
});
Playwright's selectOption action changes selected options and triggers input and change events. It does not test operating the native popup with keys or a touch screen. Retain those manual picker checks. Add separate integration tests for request payloads, server rejection, and dependent option loading using the website form testing checklist.
Check the deployed form page with Slop Audit
After the local checks, run Slop Audit on the public form page. Review the available axe violation evidence, including a select-name finding if the engine observes one, and sampled keyboard focus evidence. Repair the reported markup, deploy, and rescan to compare the available results.
Slop Audit audits bounded public-page states. Its basic form-label check alone is not proof that a select is named correctly. It does not exercise every option, verify your submitted track value, operate every native mobile picker, or establish screen-reader speech or accessibility compliance. Keep the focused state tests and manual checks with the release record, alongside the public-page report.