LRNWebComponents / hax-body

CODE MOVED TO https://github.com/elmsln/lrnwebcomponents PROJECT HOME:
https://haxtheweb.org/
Apache License 2.0
55 stars 7 forks source link

json schema array input needs better aria handling #151

Closed ellvix closed 5 years ago

ellvix commented 6 years ago

All buttons that are icon only do not have a text equivalent (). Eg: Plus button in Make > To Do List.

Fix could be to add text inside the button (), visible to screen readers only if need be (

btopro commented 5 years ago

hmm.. I believe there is a tooltip utilized as a label w/ each of the + and - icons on that page, I'm republishing the demo shortly when you get a chance could you confirm if this is an issue still?

ellvix commented 5 years ago

Sorry to report that there's still an issue on this one (assuming it was republished).

I think the issue is that the tooltip is not inside the button. It's right after it. As such, the component can't find the associated text. Could possibly do a 'aria-labelledby="[id of tooltip]"' on it I suppose.

There may also be an issue as the tooltip is not visible by default. The hidden class gets remove as soon as you focus / mouseover, but might not be able to pass the 'Add' text across if it's not there first. Will have to test that if it comes to it.

btopro commented 5 years ago

np, thank you for reconfirming this!

btopro commented 5 years ago

Ahh I see what the issue is. I've added title's and dropped the tooltips for the time being. This makes it at least functional but certainly needs some UX clean up in it's implementation (UX on screen reader side that is).

@nikkimk this form is actually driven by a fork of eco-json-schema-form that we maintain -- https://github.com/LRNWebComponents/eco-json-schema-form

The referenced commits point to the lrn branch of that repo, specifically this area https://github.com/LRNWebComponents/eco-json-schema-form/blob/lrn/eco-json-schema-array.html#L214

Effectively when someone hits plus or minus it generates more parts of the form (cause it's an array of potential values). The commits at least make it so screen readers can see these buttons and interface with them though additional aria is certainly needed to make more sense of it.

btopro commented 5 years ago

updated title to reflect the issue more accurately now that the icons w/o buttons aspect was resolved but opens up a deeper issue