docassemble
docassemble copied to clipboard
Accessibility - human-language element attributes
From what I understand, for inputs and such it's more accessible for the labels and names of the fields and field sections to have human-understandable meta text.
- https://developer.mozilla.org/en-US/docs/Learn/Accessibility/HTML#UI_controls (see the 'Meaningful text labels' section)
- https://developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics#Accessibility_of_non-semantic_controls (see things like
aria-required)
I've searched the source of interview pages and I've found a couple aria attributes in there, but I haven't yet seen one on any of the inputs. I haven't spent enough time to note other needs. Also, I'm not especially trained in accessibility.
I'm not sure how realistic it is to do this. It might at least be a step towards this if developers could set various attributes on their elements.
I did not find anything in the cited sources that suggests the name attribute should be human-readable. There are examples in the sources of name="q".
If the content of a <label> element contains the label, my understanding is that an aria label tag is unnecessary and duplicative.
Oh, hmm, didn't know that about name. I haven't seen an example of name where it wasn't related to its functionality. Do all labels have useful human-readable text? How are no labels handled? Or do they not need to be handled in this case?
To follow up on the second part, aria-required doesn't have anything to do with labels. I brought it up because I didn't see it on required fields.