universalviewer icon indicating copy to clipboard operation
universalviewer copied to clipboard

Clarify that accessibility approach to buttons is acceptable across community

Open tomcrane opened this issue 7 years ago • 5 comments
trafficstars

This is the current approach:

<button class="share btn imageBtn" title="Share" tabindex="0">
    <i class="uv-icon uv-icon-share" aria-hidden="true"></i>
    Share
</button>

The button appears as an icon; the word "Share" will be read out by a screen reader.

The UV needs to follow a standard that is acceptable to its global community of adopters, and avoid having to implement things differently in different places.

tomcrane avatar Feb 01 '18 11:02 tomcrane

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role

See "Labelling buttons" section; suggests aria-label is not required.

Stanford aims for WCAG 2.0 https://www.w3.org/TR/WCAG20/

Stanford's UV work changed anchor tags to buttons.

tomcrane avatar Feb 01 '18 15:02 tomcrane

From Community Call - Stanford happy to work with UV adopters to agree on a common approach to accessibility, National Library of Wales also. Jennifer Vine from Stanford will be at UVCON so ideal chance on agree what standards are being adhered to and how (as implementation of, say, WCAG 2.0 is not a simple matter of following a recipe book).

tomcrane avatar Feb 01 '18 15:02 tomcrane

aria-label

In creating this common approach, it should be clarified that buttons that have no text, like icon buttons, should have the aria-label since there is no text inside the button for the screen reader.

tabindex

Additionally, since these are buttons, tabindex is not needed. The tabindex item only needs to be used if a span is given the role button, such as: <span role="button" tabindex="0" https://developer.paciellogroup.com/blog/2014/08/using-the-tabindex-attribute/

An example would be

<div class="nextOptions">
   <button class="btn imageBtn next" aria-label="Next Image">
       <i class="uv-icon-next" aria-hidden="true"></i>
   </button>
   <button class="btn imageBtn last" aria-label="Last Image">
       <i class="uv-icon-last" aria-hidden="true"></i>
   </button>
</div>

kzadrozny avatar Apr 02 '18 17:04 kzadrozny

All issues will be triaged for further investigation or closure by the 28 September 2023. If your issue is still relevant and would like for it be investigated further please comment by 14 September 2023.

LlGC-szw avatar Aug 25 '23 11:08 LlGC-szw

Marked as active until we can confirm that accessibility needs are met appropriately.

demiankatz avatar Nov 15 '23 15:11 demiankatz