Labels are a foundational part of any accessible form. Without properly implemented, users who rely on screen readers have no way to understand what a field is asking for. A label does two things: it tells the user what a field is for, and it connects that meaning to the input in the code so assistive technology can announce it. There are a number of basic form label accessibility rules all developers should follow to build accessible forms.

Use the <label> element

Every input needs a visible, programmatic label. The most reliable way to label an input is with the HTML element, linked to the input using matching for and id attributes. Example is below:

<label for="email">Email address</label>

<input type="email" id="email" name="email">