The following example is a typical form field for collecting a first name. I have an aria-describedby on the input referencing two different text-areas that help describe the inputs function.
- The first aria-describedby reference is what I called "Hint" and is basically the placeholder attribute text on the input (aka the shadow text you see in the back of the text box). The “Hint” text area is a span with a class to visibly hide it but will still be read by screen readers.
- The second aria-describedby reference is what I call "Help" and is the information bubble text (beside the label you can click the blue (i) icon to get help text).
My Dilemma!
Using the screen reader JAWS and tabbing through my form field area it reads the information bubble. Then when I tab to the input it reads the label, placeholder text, Hint text which is the placeholder text I placed in a span, and finally the Help text which is the information bubble text again. I feel like the aria-describedby are not needed because the information was read twice!
On the other hand, if I take out the aria-describedby I may cause issues too from what I have read online. Some assistive technologies don't read placeholder text, so I should have it there to make sure the information is read. The information bubble is just kind of placed next to the label not part of it (so the association to the ‘control / label’ could be overlooked by accident).
(Sample of what was talked about above)
<div class="form-group">
<span class="required" aria-required="true"><i title="Required" class="fas fa-asterisk fa-cl" aria-hidden="true"></i><span class="sr-only">Required</span></span>
<label for="Textbox3836">First Name</label>
<span tabindex="0" role="button" class="text-info help-icon" data-balloon-pos="down" data-balloon-length="large" id="Textbox3836_Help_desc" aria-label="Tip: Please enter your legal first name."><i class="fas fa-info-circle fa-lg" aria-hidden="true"></i></span>
<input class="form-control" type="text" id="Textbox3836" name="Textbox3836" maxlength="250" placeholder="Ex: Andrew" data-identifier="Text box" aria-describedby="Textbox3836_Hint_desc Textbox3836_Help_desc">
<span class="sr-only" id="Textbox3836_Hint_desc">Example Andrew</span>
</div>
Here is the information window showing
Keep in mind the type of users I need to support and the types of assistive-technology they will uses.
- Blind (screen reader products like JAWS or NVDA)
- Impaired vision (screen magnifying products like ZoomText or SuperNova)
- Physical impairment (Voice navigation products like Dragon Natural Speak)
Additional Information: About the information bubble it used to be an icon tag with a title set on it but that is a mouse only feature and isn't friendly to assistive-technology.