volto icon indicating copy to clipboard operation
volto copied to clipboard

a11y: add aria-required on required fields

Open giuliaghisini opened this issue 1 year ago • 3 comments

add aria-required on required fields and add aria-described-by on error message to associate the field to the error message

giuliaghisini avatar Jan 11 '24 15:01 giuliaghisini

@giuliaghisini Can you please help me with that issue , I thought issue is regarding aria-required and aria-described in normal html tags , but this issue is something else , so please help me to get there.

Aarav238 avatar Jan 12 '24 13:01 Aarav238

@giuliaghisini Can you please help me with that issue , I thought issue is regarding aria-required and aria-described in normal html tags , but this issue is something else , so please help me to get there.

When you are editing a content-type, for exaple, and you have some required fields in form, they doesn't have aria-required="true" attribute if it's a required field, and in case of some validation error, the error message isn't linked to the field, so the field has to have aria-described-by="id_of_the_wrapper_error_field_description" to enable screen reader to read error message for that field.

This attributes are required for accessibility of the interface.

giuliaghisini avatar Jan 15 '24 12:01 giuliaghisini

Thanks @giuliaghisini I will work on it.

Aarav238 avatar Jan 15 '24 18:01 Aarav238