solex2006 / SELIProject

SELI Project
9 stars 17 forks source link

The purpose of each link must be determined #113

Open ecureuill opened 4 years ago

ecureuill commented 4 years ago

This is a "not-end" requirement. What I want to mean is that this should be considered for any new page you create that Student can access. Also should correct the old pages.

I will use the label Feature Design Notes to this cases


WCAG: 2.4.4 e 2.4.9

Scenario: Link only

NOTE for Allowing the user to choose short or long link text using A switch mechanism This technique can be used in combination with a style switching technique to present a page that is a conforming alternate version for non-conforming content. Refer to C29: Using a style switcher to provide a conforming alternate version and [Understanding Conforming Alternate Versions for more information]'https://www.w3.org/WAI/WCAG21/Understanding/conformance#conforming-alt-versions).

Examples

Scenario: with context

Examples

Example 1: Describing the purpose of a link in HTML using aria-label.

In some situations, designers may choose to lessen the visual appearance of links on a page by using shorter, repeated link text such as "read more". These situations provide a good use case for aria-label in that the simpler, non-descriptive "read more" text on the page can be replaced with a more descriptive label of the link. The words 'read more' are repeated in the aria-label (which replaces the original anchor text of "[Read more...]") to allow consistent communication between users.

 <h4>Neighborhood News</h4>
 <p>Seminole tax hike:  Seminole city managers are proposing a 75% increase in 
 property taxes for the coming fiscal year.
 <a href="taxhike.html" aria-label="Read more about Seminole tax hike">[Read more...]</a>
 </p> 

 <p>Baby Mayor:  Seminole voters elect the city's youngest mayor ever by voting in 3 year
 old Willy "Dusty" Williams in yesterday's mayoral election.
 <a href="babymayor.html" aria-label="Read more about Seminole's new baby mayor">[Read more...]</a>
 </p>

Example 2: Providing additional information for links

This example will mean that the link text as shown on screen is then used as the start of the accessible name for the link. Popular screen readers like JAWS and NVDA will announce this as: "Read more ...Storms hit east coast" and will display that same text in the links list which is very useful for screen reader users who may browse by links.

<h2 id="headline">Storms hit east coast</h2>

<p>Torrential rain and gale force winds have struck the east coast, causing flooding in many coastal towns.
<a id="p123" href="news.html" aria-labelledby="p123 headline">Read more...</a></p>

Example 3: Concatenating link text from multiple sources

There may be cases where an author will placed a tag around a section of code that will be referenced.

Note: The use of tabindex="-1" on the span element is not meant to support focusing by scripts - here, it merely serves to ensure that some browsers (IE9, IE10) will include the span element in the accessibility tree, thus making it available for reference by aria-labelledby. For more details see Accessible HTML Elements.

<p>Download <span id="report-title" tabindex="-1">2012 Sales Report</span>:
<a aria-labelledby="report-title pdf" href="#" id="pdf">PDF</a> |
<a aria-labelledby="report-title doc" href="#" id="doc">Word</a> |
<a aria-labelledby="report-title ppt" href="#" id="ppt">Powerpoint</a></p>

Example 4: combined with its enclosing paragraph

Announcements column on a Folk Festival Web page.

<h3>The final 15</h3>
<p>Coming soon to a town near you...the final 15 in the 
National Folk Festival lineup.
<a href="final15.html">[Read more...]</a>
</p>

<h3>Folk artists get awards</h3>
<p>Performers from the upcoming National Folk Festival receive 
 National Heritage Fellowships. 
 <a href="nheritage.html">[Read more...]</a>
</p>

Tests Procedure

For each link in the content that uses this technique:

  1. Check that text or a text alternative for non-text content is included in the a element
    1. If an img element is the only content of the a element, check that its text alternative describes the purpose of the link
    2. If the a element contains one or more img element(s) and the text alternative of the img element(s) is empty, check that the text of the link describes the purpose of the link
    3. If the a element only contains text, check that the text describes the purpose of the link
  2. If the text link is not sufficient to understand the link, check that the link is part of a sentence
    1. Check that text of the link combined with the text of its enclosing sentence describes the purpose of the link
    2. Check that purpose of the link is determined by a link text combined with programmatically determined link context
      1. Check that the value of the aria-label or aria-labelledby attribute properly describes the purpose of the link element.; or
      2. Check for other techniques

Expected Results: The above checks are true.

Switch link text

  1. Check that there is a control near the beginning of the Web page to change link text.
  2. Activate the control.
  3. Check that all links in the resulting Web page have link text that describes their purpose.
github-actions[bot] commented 4 years ago

This Feature is ready to be implemented.

github-actions[bot] commented 4 years ago

Failures

Course Content