Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions techniques/html/H2.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h2>When to Use</h2>
</section>
<section id="description">
<h2>Description</h2>
<p>This objective of this technique is to provide both text and iconic representations of links without making the web page more confusing or difficult for keyboard users or assistive technology users. Since different users finding text and icons more usable, providing both can improve the accessibility of the link.</p>
<p>The objective of this technique is to provide both text and iconic representations of links without making the web page more confusing or difficult for keyboard users or assistive technology users. Since different users find text and icons more usable, providing both can improve the accessibility of the link.</p>
<p>Many links have both a text and iconic representation adjacent to each other, but rendered in separate <code>a</code> elements. Visually they appear to be a single link, but many users encounter them as adjacent identical links. For a keyboard user, it is tedious to navigate through redundant links. For users of assistive technologies, it can be confusing to encounter successive identical links. When the text alternative for the icon is a duplicate of the link text, it is repetitive as screen readers read the description twice.</p>
<p>If the author omitted alternative text from the link image, it would fail <a href="../../understanding/20/non-text-content.html">Success Criterion 1.1.1 Non-text Content</a> because the text alternative would not serve the same purpose as the graphical link.</p>
<p>This technique provides such links by putting the text and image together in one <code>a</code> element and providing null alternative text on the image to eliminate duplication of text. In this way, both representations of the link are provided, but keyboard users only encounter one link and assistive technology that provides users with link lists for a web page does not include duplicate links.</p>
Expand All @@ -34,10 +34,10 @@ <h2>Examples</h2>
&lt;/a&gt;</code></pre>
</section>
<section class="example">
<p>A link contains an icon and text, and the site help refers to the icon. The <code>img</code> has a text alternative which is the name used for the icon in the site help, which describes clicking the home page icon.</p>
<p>A link contains text and an icon. The text gives the title of a book to download and the icon shows the file type of the download. The <code>img</code> has a text alternative which indicates the file type.</p>

<pre><code class="language-html">&lt;a href="home.html"&gt;
&lt;img src="house.gif" alt="home page icon"&gt;Go to the home page
<pre><code class="language-html">&lt;a href="book2.epub"&gt;
Download Book 2 &lt;img src="epub.gif" alt="EPUB"&gt;
&lt;/a&gt;</code></pre>
</section>
</section>
Expand All @@ -47,8 +47,8 @@ <h2>Tests</h2>
<h3>Procedure</h3>
<p>For each <code>a</code> applying this technique:</p>
<ol>
<li>Check that every <code>img</code> element contained within the <code>a</code> element has a null value set for its <code>alt</code> attribute.</li>
<li>Check that the <code>a</code> element contains an <code>img</code> element that has either a null <code>alt</code> attribute value or a value that supplements the link text and describes the image</li>
<li>Check that the combined text from the <code>a</code> element and the <code>alt</code> attribute values from <code>img</code> elements contained in the <code>a</code> element clearly identifies the target of the link.</li>
<li>Check that adjacent links do not go to the same target.</li>
</ol>
</section>
<section class="results">
Expand Down