Forms – Accessibility Guidelines
Accessibility
18F
GSA
Table of Contents
Making forms accessible is a simple process. Each form element should be associated with its instructions and errors, and everything should be accessible via the keyboard.
Testing>
Testing #
- Identify each form element.
- Find all instructions associated with each element.
- It is a failure if a form element isn’t programmatically associated with all instructions. This includes legends, labels, hint text and tooltips.
- A common way of achieving this is using
fieldset
andlegend
tags.Fieldset
is used to group a set of elements.Legend
is the first child of afieldset
tag and provides context for those fields.
- Ensure all field elements are accessible via the keyboard.
- If the form cannot be filled out with just a keyboard, this is a failure.
- Check for title attributes
- Title attributes can be a substitute for labels.
- If the title attributes provides all the related information it passes, if it provides extra information it fails.
- Title attributes are not accessible via keyboard.