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

Remove `aria-labelledby` for the `main` role element in DA #798

Closed BryceStevenWilley closed 8 months ago

BryceStevenWilley commented 10 months ago

From the VT accessibility audit:

The main content container (< div > having role=”main” ) has an aria-labelledby attribute that references the link at the very top of the page (“VTCourtForms Asking for a Relief from Abuse order (RFA) in Vermont”). Since much of this text is repeated in both the page title and the < h1 >, applying aria-labelledby here merely causes the screen reader to announce it one more time, which is redundant. We recommend removing the aria-labelledby attribute. 3-Moderate

An upstream fix, but should be simple.

BryceStevenWilley commented 8 months ago

As per usual, I was wrong; this is not simple. The <div id="daquestion" role="main"> tag has aria-labelledby="dapagetitle, which references the interview title, i.e. what's in the top left corner of the interview, usually the form's name. That is distinct from the title of the page, which is the h1 / question text. Only on the first page would it be fairly repetitive, as the title of the first page also should include the name of the form. Unfortunately, we don't have that much control over the generated HTML of the page for just the opening page.

I do think that it might be an improvement for the dapagetitle id to be on a more specific part of the interview title, maybe just the form name, and not include the name of the organization, but the way docassemble is set up, that's not very possible either; everything in the interview title is in dapagetitle.

Going to close as won't fix, as it's less of an issue than I thought, and a fix is not cut and dry better accessibility on all pages, only in certain contexts.