Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility labelling for forms #228

Open
jace opened this issue Jun 10, 2019 · 0 comments
Open

Accessibility labelling for forms #228

jace opened this issue Jun 10, 2019 · 0 comments
Assignees

Comments

@jace
Copy link
Member

jace commented Jun 10, 2019

Forms need aria labels for accessibility:

  1. Rename ref_id to form_dom_id to indicate that this is an identifier in the DOM
  2. All labels, descriptions and error messages accompanying a field should have id tags in the form {{ form_dom_id }}-label, -description, -error-0, etc. Since there could be multiple errors, they need to be indexed.
  3. The fields themselves need two additional ARIA tags:
    1. aria-describedby which has all of the above ids, separated by spaces
    2. aria-invalid, whose value is {% if field.errors %}true{% else %}false{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants