wai-website icon indicating copy to clipboard operation
wai-website copied to clipboard

[New Tip] Design tip no3 - Example

Open dboudreau opened this issue 8 years ago • 4 comments

Reference: http://w3c.github.io/wai-quick-start/designing.html#ensure-that-interactive-elements-are-easy-to-identify

I suggest we add additional information for screen reader users to understand the examples better. Currently, the <figcaption> text for the examples read:

<figcaption>
<svg class="tick" aria-hidden="true">
<use xlink:href="images/icons.svg#tick">
</svg>
Style links to stand out from text
</figcaption>

I suggest we provide additional context:

<figcaption>
<svg class="tick" aria-hidden="true">
<use xlink:href="images/icons.svg#tick">
</svg>
<div class="hidden-accessible">Good example using</div>
Style links to stand out from text
</figcaption>

Where "hidden-accessible" would refer to the following CSS rules:

.hidden-accessible {
     border: 0; 
     clip: rect(0 0 0 0); 
     height: 1px; 
     width: 1px; 
     margin: -1px; 
     padding: 0; 
     overflow: hidden; 
     position: absolute;
}

The same could be applied to the following examples:

<figcaption>
<svg class="tick" aria-hidden="true">
<use xlink:href="images/icons.svg#tick">
</svg>
Mouse hover style
</figcaption>
<figcaption>
<svg class="tick" aria-hidden="true">
<use xlink:href="images/icons.svg#tick">
</svg>
Keyboard focus style
</figcaption>
<figcaption>
<svg class="tick" aria-hidden="true">
<use xlink:href="images/icons.svg#tick">
</svg>
Touch or click style
</figcaption>

dboudreau avatar Aug 30 '16 14:08 dboudreau