ZUGFeRD / quba-viewer

Quba is a viewer for electronic invoices
Apache License 2.0
97 stars 20 forks source link

better accessibility for vision impaired users #4

Open jstaerk opened 3 years ago

jstaerk commented 3 years ago

There are several standards (e.g. WAI WCAG) and several tools to check compliance (e.g. the lighthouse plugin for Chrome or https://wave.webaim.org/. To simulate one might turn to text mode browsers like w3m (available for windows e.g. in the https://www.cygwin.com/ context), open-source (https://nvda.bhvd.de/) or other free (e.g. Windows Narrator, in german windows just search for "Sprachausgabe") screenreaders.

The blind person I asked was a "digital native" but nevertheless never got along very well with NVDA, mentioned that recognized vision impaired people in Germany would most likely get subsidiaries to a commercial screenreader (like the 1000$ software called JAWS, which he recommended) and otherwise recommended Windows Narrator.

We're using a open-source project (https://github.com/itplr-kosit/xrechnung-visualization) to generate the HTML for the display of our electronic invoices. The generated HTML is "100%" WCAG and electron forwards the accessibility for screenreaders already available in Chrome but it turns out there nevertheless is still an issue:

All "sections" are described but for screenreaders, the whole document looks like only one section. Which means that NVDA reads everything which takes very long, and Narrator basically reads nothing, unless prompted very hard.

Visually one immediately recognizes multiple sections, Recipient information ("Informationen zum Käufer") seller information ("Informationen zum Verkäufer") and data ("Rechnungsdaten") in the screenshot image

The patch seems to be trivial, most likely it would suffice to add a tabindex="0" attribute to all visual sections, which also makes it much easier to navigate using keyboard (i.e. cursor keys and tab). We just need somebody to implement that on the Kosit XSLTs, and PR us and them. We would very much like to help but we won't do it on our own initiative.