What are the Autocomplete Attributes Defined in 1.3.5 Input Purpose?
When WCAG 2.1 came out in 2018, it introduced a new success criterion namely 1.3.5 – Identify Input Purpose. It aims to ease the auto-fill capability of browsers and other assistive technologies when web sites and apps ask the users to fill out personal information. One of the sufficient techniques suggested to test for the success criterion is the use of HTML autocomplete attributes along with autofill tokens specified in HTML 5.2.
The HTML autofill tokens help machines identify the purpose of the input control irrespective of the visible label used, whether it is a visible text label or an icon. In the future, the personalization of the web is going to be a huge phenomenon and people will use different assistive technologies and devices to render and access content. Given this context, if the visible label is provided in the form of an icon instead of text, the machines can still interpret what the input type is and provide the user with necessary hints to fill the forms successfully.
There are 53 HTML 5.2 autofill tokens. In this post, we are providing them for easy access along with a short explanation for each token.
Autocomplete Value | Related Element | Description |
---|---|---|
name | autocomplete=”name” | Full name |
honorific-prefix | autocomplete=”honorific-prefix” | Prefix or title (e.g., “Mr.”, “Ms.”, “Dr.”, “Mlle“) |
given-name | autocomplete=”given-name” | Given name (in some Western cultures, also known as the first name) |
additional-name | autocomplete=”additional-name” | Additional names (in some Western cultures, also known as middle names, forenames other than the first name) |
family-name | autocomplete=”family-name” | Family name (in some Western cultures, also known as the last name or surname) |
honorific-suffix | autocomplete=”honorific-suffix” | Suffix (e.g., “Jr.”, “B.Sc.”, “MBASW”, “II”) |
nickname | autocomplete=”nickname” | Nickname, screen name, handle: a typically short name used instead of the full name |
username | autocomplete=”username” | A username |
new-password | autocomplete=”new-password” | A new password (e.g., when creating an account or changing a password) |
current-password | autocomplete=”current-password” | The current password for the account identified by the username field (e.g., when logging in) |
organization-title | autocomplete=”organization-title” | Job title (e.g., “Software Engineer”, “Senior Vice President”, “Deputy Managing Director”) |
organization | autocomplete=”organization” | Company name corresponding to the person, address, or contact information in the other fields associated with this field |
street-address | autocomplete=”street-address” | Street address (multiple lines, newlines preserved) |
address-line1 | autocomplete=”address-line1″ | Street address (one line per field, line 1) |
address-line2 | autocomplete=”address-line2″ | Street address (one line per field, line 2) |
address-line3 | autocomplete=”address-line3″ | Street address (one line per field, line 3) |
address-level4 | autocomplete=”address-level4″ | The most fine-grained administrative level, in addresses with four administrative levels. |
address-level3 | autocomplete=”address-level3″ | The third administrative level, in addresses with three or more administrative levels. |
address-level2 | autocomplete=”address-level2″ | The second administrative level, in addresses with two or more administrative levels; in the countries with two administrative levels, this would typically be the city, town, village, or other locality within which the relevant street address is found. |
address-level1 | autocomplete=”address-level1″ | The broadest administrative level in the address, i.e., the province within which the locality is found; for example, in the US, this would be the state; in Switzerland it would be the canton; in the UK, the post town. |
country | autocomplete=”country” | Country code |
country-name | autocomplete=”country-name” | Country name |
postal-code | autocomplete=”postal-code” | Postal code, post code, ZIP code, CEDEX code (if CEDEX, append “CEDEX”, and the dissement, if relevant, to the address-level2 field) |
cc-name | autocomplete=”cc-name” | Full name as given on the payment instrument. |
cc-given-name | autocomplete=”cc-given-name” | Given name as given on the payment instrument (in some Western cultures, also known as the first name). |
cc-additional-name | autocomplete=”cc-additional-name” | Additional names given on the payment instrument (in some Western cultures, also known as middle names, forenames other than the first name). |
cc-family-name | autocomplete=”cc-family-name” | Family name given on the payment instrument (in some Western cultures, also known as the last name or surname). |
cc-number | autocomplete=”cc-number” | Code identifying the payment instrument (e.g., the credit card number). |
cc-exp | autocomplete=”cc-exp” | Expiration date of the payment instrument. |
cc-exp-month | autocomplete=”cc-exp-month” | Month component of the expiration date of the payment instrument. |
cc-exp-year | autocomplete=”cc-exp-year” | Year component of the expiration date of the payment instrument. |
cc-csc | autocomplete=”cc-csc” | Security code for the payment instrument (also known as the card security code (CSC), card validation code (CVC), card verification value (CVV), signature panel code (SPC), credit card ID (CCID), etc). |
cc-type | autocomplete=”cc-type” | Type of payment instrument. |
transaction-currency | autocomplete=”transaction-currency” | The currency that the user would prefer the transaction to use. |
transaction-amount | autocomplete=”transaction-amount” | The amount that the user would like for the transaction (e.g., when entering a bid or sale price). |
language | autocomplete=”language” | Preferred language |
bday | autocomplete=”bday” | Birthday |
bday-day | autocomplete=”bday-day” | Day component of birthday |
bday-month | autocomplete=”bday-month” | Month component of birthday |
bday-year | autocomplete=”bday-year” | Year component of birthday |
sex | autocomplete=”sex” | Gender identity (e.g., Female, Fa’afafine) |
url | autocomplete=”url” | Home page or other Web page corresponding to the company, person, address, or contact information in the other fields associated with this field. |
photo | autocomplete=”photo” | Photograph, icon, or other image corresponding to the company, person, address, or contact information in the other fields associated with this field. |
tel | autocomplete=”tel” | Full telephone number, including country code. |
tel-country-code | autocomplete=”tel-country-code” | Country code component of the telephone number. |
tel-national | autocomplete=”tel-national” | Telephone number without the country code component, with a country-internal prefix applied if applicable. |
tel-area-code | autocomplete=”tel-area-code” | Area code component of the telephone number, with a country-internal prefix applied if applicable. |
tel-local | autocomplete=”tel-local” | Telephone number without the country code and area code components. |
tel-local-prefix | autocomplete=”tel-local-prefix” | First part of the component of the telephone number that follows the area code, when that component is split into two components. |
tel-local-suffix | autocomplete=”tel-local-suffix” | Second part of the component of the telephone number that follows the area code, when that component is split into two components. |
tel-extension | autocomplete=”tel-extension” | Telephone number internal extension code. |
autocomplete=”email” | E-mail address | |
impp | autocomplete=”impp” | URL representing an instant messaging protocol endpoint (for example, “aim:goim?screenname=example” or “xmpp:[email protected]“). |
Here is an example form that shows on how to implement the auto complete attributes to pass the 1.3.5 input purpose success criterion.
Next in series we will cover the topic of how to test for WCAG 1.3.5 input purpose.