SuffolkLITLab / docassemble-AssemblyLine

Quickly go from a paper court form to a runnable, guided, step-by-step web application powered by Docassemble. Swap out branding and pre-built questions to meet your needs.
https://suffolklitlab.org/docassemble-AssemblyLine-documentation/
MIT License
41 stars 5 forks source link

Error messages are silent for screen readers #799

Open BryceStevenWilley opened 10 months ago

BryceStevenWilley commented 10 months ago

From the VT accessibility audit:

On some steps, when the user clicks “Next” without completing all required fields, an error message is presented visually, but the screen reader is silent. We recommend using the HTML required attribute, which will obviate the need for the existing error messaging mechanism. 2-Significant

BryceStevenWilley commented 8 months ago

A little bit more testing here reveals that it's only an issue with radio buttons, since they are custom (i.e. not native HTML element) fields that don't use required.

I'm not going to get the chance to work on this as much for a bit, so I'll remove my assignment. I do think that docassemble should consider using input radio buttons and not the current thing that it's doing (which might be labelauty? I'm not totally sure), but that would be a fairly big change with lots of testing required (not to mention probably breaking Kiln again). But the accessibility of the native components would be a lot better. Would address #796 as well.

Some resources for styling native radio inputs:

If that isn't possible for whatever reason, look into aria's alert role, and figure out how to apply it to radio buttons.

VTskier commented 5 months ago

@nonprofittechy This was marked a high "level 2-Significant" issue in the audit.

nonprofittechy commented 5 months ago

This is not one we will be able to fix internally. It needs a patch to Docassemble. Perhaps we should ping @jhpyle to see if he has ideas