diff --git a/packages/usa-form/src/test/test-pattern/test-usa-form.twig b/packages/usa-form/src/test/test-pattern/test-usa-form.twig index 3bf6e2355f..19f44c5c88 100644 --- a/packages/usa-form/src/test/test-pattern/test-usa-form.twig +++ b/packages/usa-form/src/test/test-pattern/test-usa-form.twig @@ -1,10 +1,18 @@ +{# * +* While we could add the usa-form-group--error class to
elements, we should +* avoid doing this and only add it to usa-form-group elements. +* +* Setting the error on the form element would add the error class to the entire form and not just +* the form question that holds the error. +*#}
-
- +
+ This is an input with a character counter. + {% if error_state == true %}Helpful error message{% endif %} -
- Checkbox -
- - -
-
- - -
-
+{# * +* usa-legend and usa-label output the same base styles. Because of this, we can add the +* usa-label--error class without any additional changes or unexpected style conflicts. +*#} +
+
+ Checkbox + {% if error_state == true %}Helpful error message{% endif %} +
+ + +
+
+ + +
+
+
+{# * +* In order for the red border to highlight the form input with an error, the elements must be +* nested within a div with the usa-form-group and usa-form-group--error classes. +*#} +
+
+ Radio + {% if error_state == true %}Helpful error message{% endif %} +
+ + +
+
+ + +
+
+
-
- Radio -
- + + {% if error_state == true %}Helpful error message{% endif %} +
+
-
- - -
-
- - -
-
-
-
{% endif %} + + +
+
+ Memorable date + For example: January 19 2000 + {% if error_state == true %}Helpful error message{% endif %} +
+
+ + +
+
+ + +
+
+ + +
+
+
+
- - + {% if error_state == true %}
{% endif %} + + {% if error_state == true %}Helpful error message{% endif %} + + {% if error_state == true %}
{% endif %}
- - + {% if error_state == true %}
{% endif %} + + {% if error_state == true %}Helpful error message{% endif %} + + {% if error_state == true %}
{% endif %}
- - + + {% if error_state == true %}Helpful error message{% endif %} + +
-
-