liveBook · Manning

Form hint

As explained in Architecting Accessibility

Supplementary guidance that helps users understand how to complete a form field or task.

A form hint gives people guidance beyond a field label, such as an expected format, example, or where to find requested information. Keep it near the field and associate it visually and programmatically so users can find and understand it. section 6.1.2 section 6.6

Make required fields clear. Writing “Email (required)” beside a label is clearer than relying on an asterisk; if nearly all fields are required, a form-level instruction is an option, but users must remember it. Consider removing optional fields that are not needed for the task. section 6.1.2

A booking reference field

A hint can tell users to enter the 8-character code from their confirmation email and show an example such as BID12345. Associate the hint with the input using aria-describedby, and mark the input required when the field is mandatory. section 6.1.2

Put help beside unfamiliar terms or instructions so users can stay with the task. Tooltips can offer brief explanations, but make their information available through controls usable with a keyboard, pointing device, and touch; hover-only help can exclude users. section 6.6

...
<p>
  Required fields are marked with an asterisk (*) #A
</p>    ...
<div> 
  <label for="booking-ref">
    Booking reference * #B
  </label>
  <p id="booking-ref-hint"> #C
    Enter the 8-character code from your confirmation email (BID12345)
  </p>
  <input   
    id="booking-ref" 
    name="booking-ref" 
    type="text" 
    required #D
    aria-describedby="booking-ref-hint"> #E
</div>
...

See the booking-reference example, including its visible hint, required attribute, and programmatic hint association. section 6.1.2

How Architecting Accessibility covers it

How deep it goes
Explains hint content, required-field wording, and field association with a worked HTML example.
Examples
Uses a booking-reference format and example, required-field wording, unfamiliar tax residency, and tooltip guidance.
What you can do after
Apply field-specific instructions with clear required labels and programmatic associations to help users enter suitable information.
How it connects
Connects form hints with labels, required fields, accessible descriptions, tooltips, and cognitive workload.

This explainer was generated by Manning's knowledge graph from the text of Architecting Accessibility. The section links point to the parts of the book it draws on.