Add aria label to purpose form

This commit is contained in:
Erin Song 2024-11-21 11:05:51 -08:00
parent 5b7a6678c6
commit 014c387910
No known key found for this signature in database
3 changed files with 6 additions and 2 deletions

View file

@ -524,7 +524,9 @@ class DotGovDomainForm(RegistrarForm):
class PurposeForm(RegistrarForm):
purpose = forms.CharField(
label="Purpose",
widget=forms.Textarea(),
widget=forms.Textarea(attrs={
'aria-label': 'What is the purpose of your requested domain? Describe how youll use your .gov domain. Will it be used for a website, email, or something else? You can enter up to 2000 characters.'
}),
validators=[
MaxLengthValidator(
2000,

View file

@ -13,7 +13,7 @@
{% endblock %}
{% block form_fields %}
{% with attr_maxlength=2000 add_label_class="usa-sr-only" %}
{% with add_aria_label="test" attr_maxlength=2000 add_label_class="usa-sr-only" %}
{% input_with_errors forms.0.purpose %}
{% endwith %}
{% endblock %}

View file

@ -70,6 +70,8 @@ error messages, if necessary.
{# this is the input field, itself #}
{% include widget.template_name %}
{% if append_gov %}
<span class="padding-top-05 padding-left-2px">.gov </span>
</div>