What is an accessible name in HTML?

An accessible name is the short text string that identifies an element to assistive technology. It answers what a control, landmark or image is called. A screen reader commonly combines that name with the element’s role and state, producing announcements such as “Search, button” or “Email address, edit text, required.”
The name can come from native HTML content and relationships: button text, a form <label>, image alt text, a table caption or the text inside a link. ARIA can supply or reference a name through aria-label and aria-labelledby. The browser applies a defined precedence, so an ARIA name can override visible descendant text.
Prefer a visible native label:
<label for="email">Email address</label>
<input id="email" name="email" type="email">
<button type="submit">Create account</button>
An accessible name is different from a description. The name should be concise and stable enough to identify the element, while a description can add instructions, format requirements or consequences. Avoid including the role word in the name, such as “Submit button,” because assistive technology already announces the role.
Inspect the computed name in browser developer tools and test it in context. Confirm that visible text and the spoken name do not conflict, especially for voice-control users who identify controls by their displayed label. Review repeated controls such as several “Edit” buttons with their surrounding context; each name may need the item being edited. Also check that a name remains accurate when state or content changes. A technically non-empty name is not sufficient if it is vague, duplicated or unrelated to the action.