GetDKAN / dkan2

Deprecated: please use the 2.x branch of the dkan repo
https://github.com/GetDKAN/dkan
GNU General Public License v2.0
18 stars 16 forks source link

Update schema to include title for Theme and Keywords array items. #394

Closed dharizza closed 4 years ago

dharizza commented 4 years ago

There are accessibility issues on the dkan_metadata_form, according to the standard WCAG AA:

This textinput element does not have a name available to an accessibility API. Valid names are: label element, title undefined, aria-label undefined, aria-labelledby undefined.

That is happening for every textfield on the Category (theme) and Tags (keyword) array fields.

Looking into the code for the rjsf project, we discovered the issue is actually in the schema we are using, so here I'm updating the schema so we comply with the WCAG AA standard.

This new schema can be tested in the rjsf playground here https://rjsf-team.github.io/react-jsonschema-form/, add this schema and run the HTML Codesniffer tool, you'll see that the error described above is not present anymore for any field in the form.