fix: Set an aria-label on freetext pronouns field (#4633)

This commit is contained in:
Lars Eggert 2022-10-22 23:26:11 +03:00 committed by GitHub
parent 395f110df2
commit d34e88dfd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,6 +116,9 @@ def get_person_form(*args, **kwargs):
self.initial["ascii"] = ""
self.fields['pronouns_selectable'] = forms.MultipleChoiceField(label='Pronouns', choices = [(option, option) for option in ["he/him", "she/her", "they/them"]], widget=forms.CheckboxSelectMultiple, required=False)
self.fields["pronouns_freetext"].widget.attrs.update(
{"aria-label": "Optionally provide your personal pronouns"}
)
self.unidecoded_ascii = False