Skip to content

Commit 0c12e36

Browse files
patrickhlaukembgowerscottaoharadbjorge
authored
Add note about transaction-amount to 1.3.5 understanding (#4362)
Follow-up to #3539 EDIT (Jan 2026): Further modified now that #4458 has been merged, to explicitly mention that it's fine not to programmatically expose certain purposes such as `transaction-amount` as they don't relate to information about the user. - [Preview](https://deploy-preview-4362--wcag2.netlify.app/understanding/identify-input-purpose) - [Diff](https://services.w3.org/htmldiff?doc1=https%3A%2F%2Fwww.w3.org%2FWAI%2FWCAG22%2FUnderstanding%2Fidentify-input-purpose&doc2=https%3A%2F%2Fdeploy-preview-4362--wcag2.netlify.app%2Funderstanding%2Fidentify-input-purpose) --------- Co-authored-by: Mike Gower <mikegower@gmail.com> Co-authored-by: Scott O'Hara <scottaohara@users.noreply.github.com> Co-authored-by: Dan Bjorge <dan@dbjorge.net>
1 parent 807a6c2 commit 0c12e36

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

understanding/21/identify-input-purpose.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<meta charset="UTF-8">
5-
<title>Identify Input Purpose - Understanding WCAG 2.1</title>
6-
<link rel="stylesheet" type="text/css" href="../../css/sources.css" class="remove">
4+
<meta charset="UTF-8">
5+
<title>Identify Input Purpose - Understanding WCAG 2.1</title>
6+
<link rel="stylesheet" type="text/css" href="../../css/sources.css" class="remove">
77
</head>
88
<body>
99
<h1>Understanding Identify Input Purpose</h1>
@@ -19,7 +19,6 @@ <h2>In brief</h2>
1919

2020
<section id="intent">
2121
<h2>Intent of this Success Criterion</h2>
22-
2322
<p>The intent of this success criterion is to ensure that the purpose of a form input collecting information about the user can be programmatically determined, so that user agents can extract and present this purpose to users using different modalities. The ability to programmatically declare the specific kind of data expected in a particular field makes filling out forms easier, especially for people with certain cognitive disabilities.</p>
2423
<p>Appropriate visible labels and instruction can help users understand the purpose of form input fields, but users may benefit from having fields that collect specific types of information be rendered in an unambiguous, consistent, and possibly customized way for different modalities - either through defaults in their user agent, or through the aid of assistive technologies.</p>
2524
<p>For some input fields, the <code>type</code> attribute already offers a way to broadly specify the intention of the input field, for example, <code>&lt;input type="tel"&gt;</code>, <code>&lt;input type="email"&gt;</code>, or <code>&lt;input type="password"&gt;</code>. However, these are only very broad categories, describing the type of input, but not necessarily its purpose, especially as it relates to user-specific input fields. As an example, <code>type="email"</code> indicates that the field is for an email address but does not clarify if the purpose is for entering the user's email address or some other person's email.</p>
@@ -29,7 +28,8 @@ <h2>Intent of this Success Criterion</h2>
2928
<p>In addition to repurposing this taxonomy, when the autocomplete attribute technique is used to meet this Success Criterion, browsers and other user agents can suggest and 'autofill' the right content by autocompleting these fields based on past user input stored in the browser. By defining more granular definitions of common input purposes, for example “Birthday” (<code>autocomplete="bday"</code>), browsers can store personalized values for each of these fields (the user's birthday date). The user is relieved of having to type the information and can instead confirm or, if needed, change the value of the field, a significant benefit for users with memory issues, dyslexia, and other disabilities. Because the <code>autocomplete</code> values are independent of language, users that may not be familiar with the text used to visually identify user input fields (the label) can still have that purpose consistently identified to them due to the fixed taxonomy of terms.</p>
3029
<p>If an input field accepts two different types of input purpose (as in combined user name/user email fields) and the technology used does not allow multiple purpose values to be defined, it is valid to provide either one or the other value or leave out the designation of input purpose altogether.</p>
3130
<p>When the user agent and assistive technology support for other metadata formats matures, metadata schemes like the <a href="https://www.w3.org/TR/adapt-symbols/">WAI-Adapt: Symbols Module</a> may be used in addition or instead of the HTML autocomplete attribute to identify the purpose of input fields. They can also support automated adaptations that identify and match author-provided input labels to defined vocabularies or symbols that are used instead for labelling inputs.</p>
32-
<p class="note">The term <q>input</q> is used here as a generic way to refer to form controls that accept user input. For instance, in HTML, it is not limited to the <code>&lt;input&gt;</code> element, but also covers other controls such as <code>&lt;select&gt;</code>.</p>
31+
<p class="note">This success criterion is specifically scoped to inputs collecting <em>information about the user</em>. The list of <a href="https://www.w3.org/TR/WCAG22/#input-purposes">Input Purposes</a> includes a few values that may not strictly be interpreted as directly relating to a user – most prominently, <code>transaction-amount</code>. An input field for information that is not <em>about the user</em> does not need to programmatically expose its purpose, even if that purpose is included in the <a href="https://www.w3.org/TR/WCAG22/#input-purposes">Input Purposes</a> list.</p>
32+
<p class="note">The term <q>input</q> is used here as a generic way to refer to form controls that accept user input. For instance, in HTML, it is not limited to the <code>&lt;input&gt;</code> element, but also covers other controls such as <code>&lt;textarea&gt;</code> and <code>&lt;select&gt;</code>.</p>
3333
</section>
3434

3535
<section id="benefits">
@@ -43,7 +43,6 @@ <h3>Specific Benefits of Success Criterion 1.3.5</h3>
4343

4444
<section id="examples">
4545
<h2>Examples of Success Criterion 1.3.5</h2>
46-
4746
<dl>
4847
<dt>A contact form using autofill</dt>
4948
<dd>A contact form auto-fills in the fields for name, street, post code, city, telephone number and email address from autofill values stored in the user's browser. Assistive technology can offer a customized way of identifying particular input fields, for example drawing on a set of symbols / icons that is familiar to the user, to communicate the purpose of the fields visually.</dd>

0 commit comments

Comments
 (0)