From b034ff5e0a617c9d416fdacc4d16d0290ff19e1e Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 10 Jan 2025 16:55:22 -0500 Subject: [PATCH] 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 Co-authored-by: Mike Gower Co-authored-by: Patrick H. Lauke --- techniques/general/G167.html | 22 +++++++++++++++--- .../general/img/button-send-message.jpg | Bin 0 -> 4942 bytes .../general/img/search-button-icon-label.png | Bin 0 -> 3592 bytes understanding/20/labels-or-instructions.html | 11 +++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 techniques/general/img/button-send-message.jpg create mode 100644 techniques/general/img/search-button-icon-label.png diff --git a/techniques/general/G167.html b/techniques/general/G167.html index e1c364fe83..e81a82adfa 100644 --- a/techniques/general/G167.html +++ b/techniques/general/G167.html @@ -1,7 +1,7 @@ Using an adjacent button to label the purpose of a field

Using an adjacent button to label the purpose of a field

ID: G167

Technology: general

Type: Technique

When to Use

All technologies that support forms

Description

-

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.

+

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.

The field must also have a programmatically determined name, per Success Criterion 4.1.2.

@@ -10,16 +10,31 @@

A search function

-

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.

+

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.

A text field with a button positioned to the right demonstrating the use of a button to label a field.
+

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.

+ +
+ 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. +
+
+ +
+

A "reply" or "send message" field

+

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.

+ +
+ 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. +
+

Picking a form

-

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.

+

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.

Tests

@@ -28,6 +43,7 @@

Picking a form

  1. Check that the field and button are adjacent to one another in the programmatically determined reading sequence.
  2. Check that the field and button are visually rendered adjacent to one another.
  3. +
  4. Where the button does not have a visible text label, check that it has an accessible name

Expected Results

diff --git a/techniques/general/img/button-send-message.jpg b/techniques/general/img/button-send-message.jpg new file mode 100644 index 0000000000000000000000000000000000000000..17ed8491d3448a66da7543d49ecc13d9e977738b GIT binary patch literal 4942 zcmeHKXH-+&(mo+HrG_9~z@QY7CMAFZ@{)kkiy}o7LNAdH(uoukA|O?&3MxfseVfx0D(Zj zP4WYrj00)_1z81wP9??Zq6D8xDoRQ)B{dZ_^`DpK3@tUy85(M8S~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4iDFV-%PAVI`le%zdw0-br;OpYA2r{hS(0U$xJhsr$p!bY66! zfBMjWA zxO}+Z_22T}YH#9Lf6VnQxm+vf_RpB>T23!lI@>Mqc)u!jB?#?cJ4vugrw5xo4sIJ>bs+}DUt__*JGMx-dW z_KSmj0IfnD>f^0uCx-|7vx-xYuQE&08oC%c!Ys~qfead2~6ab|Ulks%bdtI}Ns_YVOC&0TiUIsk2 z8XFCr@;$Lc->Cmr|CiWcY-{IMeq^JEL4sEYt0+ zZ6GOBU@-kY43uj7mLGmam|>~wDCi(*cazh_Bu4_7%E{RbLL5G?=z literal 0 HcmV?d00001 diff --git a/techniques/general/img/search-button-icon-label.png b/techniques/general/img/search-button-icon-label.png new file mode 100644 index 0000000000000000000000000000000000000000..35f87581d72afaf6f954338ba221f0d8ca02f62b GIT binary patch literal 3592 zcmW+(2{@Ep8y>QZeTWnqMv9XSV2 z>fa1j89}Xr!H!uk%+=SWZvp zvX`vlN#OYp*8ROYi&}+~8GhkC!I|4PrQ&m;XegEq>3#}9oG6!JKoOtWSm6k_(QMiU zqJn5~{;L{HD_N3w#8h-s&V3-)agc^jPm3@tB_|9SL*Ipc=DL0F&A3f=D3Z17(eXm4+4Z1?E3 zEpFQ^@l!0oM;Iuw_6GHI$*qcZo!yCNhZ`TnMKyg5eSMV%y{{mXpPA<~(~mWpB=~62 zDjPIA2VaGGC1+~vuU~=wfq|`y+cP;NI9gwysnkK9LZMVXTrfYI)XsX`14I9gh|7gm z3@60JaU>=t;&3>KZ@s8X=q77WCjH+sr>aMbRudr`P5d*3rAOcK&XJe+-Vu}8~b=Fn7zBZTSiv4 zB|*74c6HT9cJI5>np6|7H9W8d2aCK0p(md=Ffw9QIKy>YNw~PAWbr5(Y*e~=J~|-a z3U~xMcNkau5}`e;^`c|?|!?1z~uMgSc99*pucS#dy1T2Bmrd{ z9wQ0U5JMY7JGSalLhhfFlrKWo2bB7N(pVGBY`Ai9(sERpv;Dl1p|e z;~EbSkD0!H+xdkuvgajYilM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@4p7-_WG(RT?t4Dtbv&q^Hk`^u^;bqz8a{{4+~cX<>Za=YtvT$hhzL3? ztZ7RfWPzJIJ3GK`Z4NucslLRii{#T1G_froxlu9p!B=1Nf=S#|5mHjD0RaI^KYrx) zg7WO;!NC*%fPkFxa$Z?kS(TR-{VHkpkE`Q?`N*!KoJ2HY?>OAT($e+eLjg^{sgEB& zvWSR^R{2g|1p-gEv`0f<%G(IK){ldv8TZnCdb6ESy)(PmzHu{71{+~MG(Iv3@jUBvFD_vrF(mOCDtlG7HjW+S@m%x zjWY95dIvn!dslV6GqeyL3^Y*OxxVt z{Dza0yt|dTIcHEN2_$*rH)hCHmGP7`e)kV<(op83aJ^7nap_B!@?Fz=wwQi!6kCSSrltzzC@VmS771t!5UXzfB#>)uC?*%ZlLQ#l$K2!M3i4ASlD%b$19M&zi z(t&tkhq|R!RfcK!`5bzbH9S1>+O;RjP_*H6rvVxE@bEe5HHv{L@~U-Q@_!$jg4fp^ zMwIqb!6tZ#~8BugxiIFAlwU*cN-`2vcEAUZe>WQQu#h!45-r htVJ=CVHBSuJ`HcvN3PWaPT=niVrFDzSdPX;{SQsg#{K{R literal 0 HcmV?d00001 diff --git a/understanding/20/labels-or-instructions.html b/understanding/20/labels-or-instructions.html index 8da1eca98a..30eb30ecb2 100644 --- a/understanding/20/labels-or-instructions.html +++ b/understanding/20/labels-or-instructions.html @@ -95,6 +95,17 @@

Examples of Labels or Instructions

  • A field for entering a date has text instructions to indicate the correct format for the date.
  • + +
  • On one website, a field with the text label of "username" is provided for someone to create a username to login to a website. + On another website, there are strict rules about what characters can be used to create a username. On this website additional instructions + would need to accompany the field to prevent users from encountering unnecessary errors. +
  • + +
  • A website provides a global search field in the header of the site. Any term can be entered, + so there are no instructions needed, but the field needs a cue to communicate its purpose. Commonly, such search + field will be paired with a "loupe" or "magnify glass" search icon, serving as its visible label, if not also doubling + as the visual identifier for the button that submits the search query. +
  • To enter their name, users are provided with two separate text fields. Rather than having a single label "Name" (which would appear to leave the second text field unlabelled),