Description
openedon Mar 27, 2018
In the gallery block, the file upload button to add a gallery item doesn't have any text or aria-label so it's completely "empty" and can't be operated with assistive technologies. See
gutenberg/blocks/library/gallery/block.js
Line 248 in af55057
Any UI control needs to be labeled.
Since it happened several times that completely unlabeled elements were introduced in the UI, would it be feasible to use some specific tests? Specifically for buttons, is there any easy way to add tests to check if the buttons have some text or some non-empty aria-label to not allow empty buttons?
Worth reminding UI control names need to be visible or at least discoverable in some way. For example, speech recognition software users need to know the name of a control to be able to voice commands. For the icon buttons, Gutenberg uses the "tooltips": that's not 100% ideal, it's a compromise with design needs but at least there's a way to discover the control name.
In this specific case, given the size and the shape of this big button, I'm not sure a tooltip would look so nice. Adding some visible text seems to me the only solution.