Identifying input purpose
WCAG2.1 Success Criteria (SC) 1.3.5 (Identify input purpose) is intended to make it easier for people to understand the purpose of form fields that collect personal information. And, to make it easier to fill in those fields. Here is the SC itself:
“The purpose of each input field collecting information about the user can be programmatically determined when:
The input field serves a purpose identified in the Input Purposes for User Interface Components section;
The content is implemented using technologies with support for identifying the expected meaning for form input data.
Input purposes for User Interface (UI)
WCAG2.1 includes a list of pieces of personal information that someone might be asked to provide. There are 53 pieces of information in the list, including name, username, postal-code, cc-number (credit card number), email, and tel (telephone number).
SC1.3.5 only applies to form fields that collect information about the person completing the form. It doesn’t apply to fields that ask for personal information about other people. So a field asking for your name would need to meet this SC, but a field asking for your husband’s name would not.
The list of input purposes is based on the HTML5.2 autofill control types. This does not mean that using the HTML autocomplete attribute is the only way to meet this SC though. Other technologies may have features that overlap with this list, but only fields that collect pieces of information included in this list are expected to meet this SC. For example, the Person Schema includes several properties that overlap with the list included in WCAG2.1, including email, familyName, gender, jobTitle, and telephone.
Benefit of SC1.3.5
Text labels for form fields are necessary, both for accessibility and good usability, but not everyone finds text easy. People with learning disabilities, people who have had a stroke or a head injury, or people with conditions like Motor Neurone Disease, often find images much easier to deal with than text.
When a form field meets SC1.3.5, it means a tool like a browser extension could determine the purpose of the field and display an icon or symbol to help people recognise it. The icon might replace the text label or be shown alongside it, depending on the tool or the user’s preferences.
There does not seem to be a standard set of symbols available for this purpose at the moment. The W3C Cognitive Accessibility Task Force intends to produce a set of interoperable symbols, and there are some sets already available (like Open Symbols), but none seems to have become the accepted standard.
When using the HTML autocomplete attribute to meet this SC, there is an additional benefit. It’s possible to automatically fill in certain form fields using the browser, instead of having to enter the information manually. This is helpful to people who find typing difficult or impossible for any reason. And, also for people who struggle to remember complex pieces of information like telephone numbers, credit card numbers, or passwords.
At the moment the HTML autocomplete attribute is a good way to meet this SC. It is well supported by browsers, and because WCAG2.1 uses the HTML5.2 autofill taxonomy as the basis for the list of input purposes, it is also comprehensive.