Visitar URL original
Merge pull request #6147 from uswds/al-time-picker-hint-text · uswds/uswds@c363a3a · GitHub
Skip to content

Commit c363a3a

Browse files
authored
Merge pull request #6147 from uswds/al-time-picker-hint-text
USWDS - Time picker: Add clarity to hint text
2 parents 8337255 + f8004cc commit c363a3a

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

‎packages/usa-form/src/test/test-pattern/test-usa-form.twig‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
{% endif %}
88

99
{# *
10-
* While we could add the usa-form-group--error class to <form class="usa-form"> elements, we should
10+
* While we could add the usa-form-group--error class to <form class="usa-form"> elements, we should
1111
* avoid doing this and only add it to usa-form-group elements.
1212
*
13-
* Setting the error on the form element would add the error class to the entire form and not just
13+
* Setting the error on the form element would add the error class to the entire form and not just
1414
* the form question that holds the error.
1515
*#}
1616
<form class="usa-form">
@@ -34,7 +34,7 @@
3434

3535

3636
{# *
37-
* usa-legend and usa-label output the same base styles. Because of this, we can add the
37+
* usa-legend and usa-label output the same base styles. Because of this, we can add the
3838
* usa-label--error class without any additional changes or unexpected style conflicts.
3939
*#}
4040
<div class="usa-form-group {% if error_state == true %}usa-form-group--error{% endif %}">
@@ -73,7 +73,7 @@
7373
</div>
7474

7575
{# *
76-
* In order for the red border to highlight the form input with an error, the elements must be
76+
* In order for the red border to highlight the form input with an error, the elements must be
7777
* nested within a div with the usa-form-group and usa-form-group--error classes.
7878
*#}
7979
<div class="usa-form-group {% if error_state == true %}usa-form-group--error{% endif %}">
@@ -111,9 +111,9 @@
111111
</fieldset>
112112
</div>
113113

114-
{# !
115-
! Adding the usa-input--error class to the combo box nested select element does not carry the class over to
116-
! its dynamically placed input element. The class remains on the hidden select element. This is true for time picker's
114+
{# !
115+
! Adding the usa-input--error class to the combo box nested select element does not carry the class over to
116+
! its dynamically placed input element. The class remains on the hidden select element. This is true for time picker's
117117
! combo box element as well.
118118
!#}
119119
<div class="usa-form-group {% if error_state == true %}usa-form-group--error{% endif %}">
@@ -167,11 +167,11 @@
167167
/>
168168
</div>
169169

170-
{# !
170+
{# !
171171
! Input mask breaks due to DOM structure changing. Related to: #5517.
172172
!
173-
! This initialization error also causes subsequent JS files to not initialize properly.
174-
! On this page, time picker does not initialize. Removing input-mask or the error states will allow time
173+
! This initialization error also causes subsequent JS files to not initialize properly.
174+
! On this page, time picker does not initialize. Removing input-mask or the error states will allow time
175175
! picker to properly initialize.
176176
!#}
177177
<form class="usa-form">
@@ -193,9 +193,9 @@
193193
{% if error_state == true %}</div>{% endif %}
194194
</form>
195195

196-
{# *
196+
{# *
197197
* Input prefix/suffix input group
198-
* For input prefix/suffix, the usa-input--error class must be put on the usa-input-group element in order for
198+
* For input prefix/suffix, the usa-input--error class must be put on the usa-input-group element in order for
199199
* the styles to display as expected
200200
*#}
201201
<form class="usa-form">
@@ -359,14 +359,14 @@
359359
</div>
360360

361361
{# !
362-
! Due to Combo box's dynamic input element not receiving the same classes as it's select placeholder,
362+
! Due to Combo box's dynamic input element not receiving the same classes as it's select placeholder,
363363
! the error input classes are not set on initialization
364364
!#}
365365
<div class="usa-form-group {% if error_state == true %}usa-form-group--error{% endif %}">
366366
<label class="usa-label {% if error_state == true %}usa-label--error{% endif %}" id="appointment-time-label" for="appointment-time"
367367
>Time picker</label
368368
>
369-
<div class="usa-hint" id="appointment-time-hint">hh:mm</div>
369+
<div class="usa-hint" id="appointment-time-hint">Select a time from the dropdown. Type into the input to filter options.</div>
370370
{% if error_state == true %}<span class="usa-error-message" role="alert">Helpful error message</span>{% endif %}
371371
<div class="usa-time-picker">
372372
<input

‎packages/usa-time-picker/src/usa-time-picker.twig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="usa-form-group">
22
<label class="usa-label" id="appointment-time-label" for="appointment-time">Appointment time</label>
3-
<div class="usa-hint" id="appointment-time-hint">hh:mm</div>
3+
<div class="usa-hint" id="appointment-time-hint">Select a time from the dropdown. Type into the input to filter options.</div>
44
<div class="usa-time-picker">
55
<input
66
class="usa-input"

0 commit comments

Comments
 (0)