Do you have a label tag for the fields associated with your input?

Last updated by Brook Jeynes [SSW] 10 months ago.See history

When adding input boxes to collect data, please always have a <label> tag associated with your <input> tag to link the labels with their respective edit controls. This improves accessibility and gives nice focusing stuff (when you click the label).

    <label for="EmailAddress">Email Address</label>
    <input id="EmailAddress" type="text"/>

Tip: To do this in ASP.NET use the AssociatedControlID parameter on your <asp:Label />; controls.

    <asp:Label ID="EmailLabel" runat="server" Text="Email Address" AssociatedControlID="EmailAddress"/>
    <asp:TextBox ID="EmailAddress" runat="server"/>

Tip: For a nicer user experience, consider using adaptive labels and inputs with a UI Library like Material UI.

We open source. Powered by GitHub