E-mail List Archives

Form field with Select options


From: Joseph Sherman
Date: Nov 6, 2017 11:03AM

What is the best and simplest way to code a form field like the following:

<label>Name<label>: <select box> <Input Name>

Where the select box has options of "Begins with, contains, equals". We use the <for/id> method to link the label Name with the Name input, but the select box has no label.

Can you associate a Label with two Form Fields? Adding an Aria-Label="Name" on the select box seems to work and is simple, but I'm not sure if it's the best way.