Introduction
Gracefully handling user input is critical to the usability of BBC services, but also an area of Interaction Design fraught with potential problems. The purpose of this document is to set out robust approaches to presenting and validating form fields.
The focus here is on web-based forms. For further guidance specific to mobile/native applications, please consult the BBC Mobile Accessibility Guidelines.
Recommended markup
Labeling
Any field's element needs to be associated programmatically with a label. This is achieved by making the label's for
attribute and the input's id
attribute share the same value.
<label for="username">Username</label>
<input type="text" id="username" name="username" />