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
Copy file name to clipboardexpand all lines: _components/accordions.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -145,10 +145,10 @@ lead: Accordions are a list of headers that can be clicked to hide or reveal add
145
145
Code header areas in the accordion as <code><buttons></code> so that they are usable with both screen readers and the keyboard.
146
146
</li>
147
147
<li>
148
-
Buttons should state whether they are expanded or not with the appropriate attribute: use either <code>aria-expanded=’true’</code> or <code>aria-expanded=’false’</code>.
148
+
Buttons should state whether they are expanded or not with the appropriate attribute: use either <code>aria-expanded=<wbr>’true’</code> or <code>aria-expanded=<wbr>’false’</code>.
149
149
</li>
150
150
<li>
151
-
Each button has a unique name <code>aria-controls=’collapsible-#’</code> that associates the control to the appropriate region by referencing the controlled elements <code>id</code>.
151
+
Each button has a unique name <code>aria-controls=<wbr>’collapsible-#’</code> that associates the control to the appropriate region by referencing the controlled elements <code>id</code>.
152
152
</li>
153
153
<li>
154
154
Each content area has an <code>aria-hidden</code> attribute set to either <code>true</code> or <code>false</code>. When <code>false</code>, the element (and all children) are neither visible or perceivable, and assistive technologies will skip this content.
<li>Use the ARIA <code>role="alert"</code> to inform assistive technologies of a time-sensitive and important message that is not interactive. If the message is interactive, use the <code>alertdialogue</code> role instead.
54
+
<li>Use the ARIA <code>role=<wbr>"alert"</code> to inform assistive technologies of a time-sensitive and important message that is not interactive. If the message is interactive, use the <code>alertdialogue</code> role instead.
55
55
<li>Do not visually hide alert messages on the page and then make them visible when they are needed. Users of older assistive technologies may still be able to perceive the alert messages even if they are not currently applicable.</li>
Copy file name to clipboardexpand all lines: _elements/form-controls.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ lead: Form controls allow users to enter information into a page.
10
10
<p>As you customize form controls from this library, be sure they continue to meet the following accessibility requirements:</p>
11
11
12
12
<ulclass="usa-content-list">
13
-
<li>All form control tags should have an associated label. The labels for attribute value should match the related input <code>id</code> attribute and should also be unique to the entire page. For example, the input with <code>id="favorite-pie"</code> will always have a label with <code>for="favorite-pie"</code>. This way screen readers are able to perceive the relevant content.</li>
14
-
<li>Any additional information—such as required, optional, or example text—should be wrapped within the label tags. For example: <code><label for="name">Favorite Pie <span>Optional</span></label></code>. This way screen readers know what additional information is related to each field.</li>
13
+
<li>All form control tags should have an associated label. The labels for attribute value should match the related input <code>id</code> attribute and should also be unique to the entire page. For example, the input with <code>id=<wbr>"favorite-pie"</code> will always have a label with <code>for=<wbr>"favorite-pie"</code>. This way screen readers are able to perceive the relevant content.</li>
14
+
<li>Any additional information—such as required, optional, or example text—should be wrapped within the label tags. For example: <code><label for=<wbr>"name">Favorite Pie <span>Optional</span></label></code>. This way screen readers know what additional information is related to each field.</li>
15
15
<li>Do not replace <code><input></code> tag-based form controls with styled <code><div></code> tags, or use JavaScript to create 'fake' form controls. Screen readers have a difficult time reading form controls that are not written in semantic HTML.</li>
16
16
<li>If you adjust the color scheme of the buttons, ensure a minimum contrast ratio of 4.5:1 (for small text, 3:1 for large) for all states of the button. This includes default, hover, selected, and disabled.</li>
17
17
</ul>
@@ -118,7 +118,7 @@ lead: Form controls allow users to enter information into a page.
118
118
<ul class="usa-content-list">
119
119
<li>Test dropdowns thoroughly with members of your target audience. Several usability experts suggest they should be the “UI of last resort.” Many users find them confusing and difficult to use.</li>
120
120
<li>Avoid making options in one dropdown menu change based on the input to another. Users often don’t understand how selecting an item in one impacts another.</li>
121
-
<li>When most users will (or should) pick a particular option, make it the default: <code><option selected="selected">Default</option></code></li>
121
+
<li>When most users will (or should) pick a particular option, make it the default: <code><option selected=<wbr>"selected">Default<wbr></option></code></li>
122
122
<li>Don’t use JavaScript to automatically submit the form (or do anything else) when an option is selected. Offer a “submit” button at the end of the form instead. Users often change their choices multiple times. Auto-submission is also less accessible.</li>
<li>Simple tables can have two levels of headers. Each header cell should have <code>scope='col'</code> or <code>scope='row'</code>.</li>
108
+
<li>Simple tables can have two levels of headers. Each header cell should have <code>scope=<wbr>'col'</code> or <code>scope=<wbr>'row'</code>.</li>
109
109
<li>Complex tables are tables with more than two levels of headers. Each header should be given a unique <code>id</code> and each data cell should have a <code>headers</code> attribute with each related header cell’s <code>id</code> listed.</li>
0 commit comments