You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update 3.3.2 understanding doc and g167 technique (#4102)
closes#4088
includes new icon-button example in G167 to showcase how a button
represented by an icon alone can be used in certain instances for
labeling form fields
also updates the understanding doc to provide two new written examples
to the examples section list.
One to not make someone have to know to look to g167 to understand that
"icons" can also serve as labels
And the second to provide an example of how two websites could have the
same sort of input, but one needs instructions (due to extra
requirements) while another doesn't (because they are super chill).
---------
Co-authored-by: Giacomo Petri <[email protected]>
Co-authored-by: Mike Gower <[email protected]>
Co-authored-by: Patrick H. Lauke <[email protected]>
Copy file name to clipboardExpand all lines: techniques/general/G167.html
+19-3Lines changed: 19 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
<!DOCTYPE html><htmllang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><title>Using an adjacent button to label the purpose of a field</title><linkrel="stylesheet" type="text/css" href="../../css/editors.css" class="remove"/></head><body><h1>Using an adjacent button to label the purpose of a field</h1><sectionclass="meta"><pclass="id">ID: G167</p><pclass="technology">Technology: general</p><pclass="type">Type: Technique</p></section><sectionid="applicability"><h2>When to Use</h2>
<p>When a button invokes a function on an input field, has a clear text label, and is rendered adjacent to the input field, the button also acts as a label for the input field. This label helps users understand the purpose of the field without introducing repetitive text on the Web page. Buttons that label single text fields typically follow the input field.</p>
4
+
<p>When a button invokes a function on an input field, has a clear text label or name, and is rendered adjacent to the input field, the button also acts as a label for the input field. This label helps users understand the purpose of the field without introducing repetitive text on the web page. Buttons that label single text fields typically follow the input field.</p>
5
5
<divclass="note">
6
6
<p>The field must also have a programmatically determined name, per
<p>A Web page contains a text field where the user can enter search terms and a button labeled "Search" for performing the search. The button is positioned right after the text field so that it is clear to the user that the text field is where to enter the search term.</p>
13
+
<p>A web page contains a text field where the user can enter search terms and a button labeled "Search" for performing the search. The button is positioned right after the text field so that it is clear to the user that the text field is where to enter the search term.</p>
14
14
<div>
15
15
<imgalt="A text field with a button positioned to the right demonstrating the use of a button to label a field." src="img/button-as-label.jpg"/>
16
16
</div>
17
+
<p>Alternatively, a button visually labeled with a "loupe" or "magnify glass" icon, with the alternative text of "search", could be used instead of a button with a text label. Variants of this icon are used to identify search inputs across not just websites, but user interfaces of non-web software as well.</p>
18
+
19
+
<div>
20
+
<imgalt="A common visual design and labeling pattern for search fields: a text field with a button, visually represented with a common magnify glass icon, positioned at the start (left) of the text field. the icon serves to both label the button and the text field." src="img/search-button-icon-label.png">
21
+
</div>
22
+
</section>
23
+
24
+
<sectionclass="example">
25
+
<h3>A "reply" or "send message" field</h3>
26
+
<p>A chat or email web application will often present users a single or multi-line text field used for composing a message. The field does not have a visible text label, but the purpose of the field - to compose a message to send - is indicated by its pairing with a button represented by a "send message" icon. The icon serving the dual purpose of visually labelling the button, as well as the text field.</p>
27
+
28
+
<div>
29
+
<imgsrc="img/button-send-message.jpg" width="360" alt="text field containing the text 'let's go'. The field has a button visually overlaying the right side of it. The button is circular and contains an arrow icon that also resembles a paper airplane - which has increasingly gained popularity as a 'send message' identifier.">
30
+
</div>
17
31
18
32
</section>
33
+
19
34
<sectionclass="example">
20
35
<h3>Picking a form</h3>
21
36
22
-
<p>A user in the United States must fill in a form. Since the laws and requirements are different in different states within the United States, the user must select the version of a form for their state of residence. A dropdown list allows the user to pick a state. The adjacent button is labeled "Get Form for State." Pressing the button takes the user to the Web page containing the form for the selected state.</p>
37
+
<p>A user in the United States must fill in a form. Since the laws and requirements are different in different states within the United States, the user must select the version of a form for their state of residence. A dropdown list allows the user to pick a state. The adjacent button is labeled "Get Form for State." Pressing the button takes the user to the web page containing the form for the selected state.</p>
23
38
24
39
</section>
25
40
</section><sectionid="tests"><h2>Tests</h2>
@@ -28,6 +43,7 @@ <h3>Picking a form</h3>
28
43
<ol>
29
44
<li>Check that the field and button are adjacent to one another in the programmatically determined reading sequence.</li>
30
45
<li>Check that the field and button are visually rendered adjacent to one another.</li>
46
+
<li>Where the button does not have a visible text label, check that it has an accessible name</li>
0 commit comments