Skip to content

Accessibility labelling for forms #228

@jace

Description

@jace

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 %}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions