Default font size Increase font size  |   Decrease font size   |  
Skip to main content

Success Criterion 1.3.1 Info and Relationships: [Level A]

The intention of this criterion is to ensure that any information and relationships specified by visual (or audio) methods may be determined programatically by assitive technologies or a text description of the information and relationship provided where this may not be possible.

Techniques

Semantic elements

Semantic elements should be used to markup the structure and not to add any visual effect. Web content should be marked up using the appropriate semantic elements. In other words, the elements are used according to their meaning, not because of the way they appear visually. Using the appropriate semantic elements will make sure the structure is available to the user agent.

Examples of this are, HTML elements such as em , abbr , blockquote and cite. They add semantic information within sentences, marking text for emphasis and identifying abbreviations, quotes and citations, respectively. MathML, a markup language designed to maintain important distinctions between structure and presentation in mathematics, includes special "presentation" markup for the complex notations used to represent mathematical ideas as well as "content" (semantic) markup for the mathematical ideas themselves.

<p>It is very easy to apply this quote by <cite>Bertrand Russell</cite> to so many things!:<p>
<blockquote>
    <p>The fact that an opinion has been widely held is no evidence whatever that it is not utterly absurd; indeed in view of the silliness of the majority of mankind, a widely spread belief is more likely to be foolish than sensible.</p>
</blockquote>

It is very easy to apply this quote by Bertrand Russell to so many things!!

The fact that an opinion has been widely held is no evidence whatever that it is not utterly absurd; indeed in view of the silliness of the majority of mankind, a widely spread belief is more likely to be foolish than sensible.

cite should not be used to emphasise text and blockquote should not be used to indent text.

sup and sub elements may be used to create superscripts and subscripts.

(x+y)(x+y)=x<sup>2</sup>+y<sup>2</sup>2xy
...
Water is H<sub>2</sub>O
(x+y)(x+y)=x2+y2+2xy
...
Water is H2O

Using text to convey presentational variations

information conveyed through variations in the formatting of text should be conveyed in text as well. When the visual appearance of text is varied to convey information, state the information explicitly in the text.

In the following example of team members, dropped squad members are striken through and new members are underlined. This should also be stated in text also.

Team Changes
  • Alistair Cook
  • Joe Root (Dropped)
  • Jonathan Trott
  • Nick Compton (New)

Joe Root has been dropped and Nick Comptom re-intrduced into the squad.

The list has been anotated with the words "new" and "dropped". In addition there is also an explanatory sentence following the list.

Separating structure from presentation

This should be the basis for any proper web page design. HTML is used to create a semantic structure of a web page and CSS is used to provide the presentational aspects in terms of decoration and layout.

Semantic markup for colour cues

Where colour is used to emphasise something, semantic markup should also be used so user agents can make this perceivable to the user.

In this example a colour has been used to emphasise mandatory fields. To make it accessible add the strong element to the label and change the intructional text to include the new semantic emphasis.

All required fields are displayed in red and are emphasized.

Tables for tabular data

In the bad old days, HTML tables were used for layout purposes. This should not be the case nowadays, CSS should be used for performing this task. Tables should only be used for displaying tabular data. The elements tr, th and td should be used to construct a semantically correct table where th elements are header cells and td are data cells. In no circumstances should it be used to embolden the cell contents (one of its default properties).

A caption should also be provided for a table, this acts much like a title or hreading for the table thus allowing screen readers to navigate to tables more easily.

<table>
  <caption>Schedule for the rest of my life</caption>
...
</table>

Whereas the caption element provides a title or heading for the table, a summary attribute should be used to provide and overview of the table's purpose. This is particularly useful when the table has a complex structure.

<table summary="This table provides my daily routine for the rest of my life, excluding bank holidays">
  <caption>Schedule for the rest of my life</caption>
...
</table>

In complex tables use the attributes scope, headers and axis can be used to describe relationships between the data. When viewing the following table it is obvious to a sighted person what the values pertain to but if listening to a screen reader it would be helpful if the column and row header were mentioned when relating to a value. This is where the scope attribute should be used to assist screen readers.

<table border="1">
    <tr>
        <th scope="col">Quarter</th>
        <th scope="col">Year</th>
        <th scope="col">Twickenham</th>
        <th scope="col">Reading</th>
        <th scope="col">Peckham</th>
    </tr>
    <tr>
        <th scope="row">Q1</th>
        <td>2007</td>
        <td>29.5</td>
        <td>33.7</td>
        <td>59.8</td>
    </tr>
	<tr>
        <th scope="row">Q2</th>
        <td>2007</td>
        <td>17.3</td>
        <td>29.5</td>
        <td>33.7</td>
    </tr>
    <tr>
        <th scope="row">Q3</th>
        <td>2007</td>
        <td>59.8</td>
        <td>17.3</td>
        <td>29.5</td>
    </tr>
    <tr>
        <th scope="row">Q4</th>
        <td>2007</td>
        <td>33.7</td>
        <td>59.8</td>
        <td>17.3</td>
    </tr>
</table>
Quarter Year Twickenham Reading Peckham
Q1 2007 29.5 33.7 59.8
Q2 2007 17.3 29.5 33.7
Q3 2007 59.8 17.3 29.5
Q4 2007 33.7 59.8 17.3

Note that the axis attribute is not very supported in any major browser and its use is not recommended.

.

When the table is complex with column and row headers spanning multiple columns and rows, the headers attribute can be used to associate a data cell with its correct header cell. The following example comes direct from W3C.

<table border="1" cellspacing="0" cellpadding="3">
    <colgroup>
        <col width="142px" />
        <col width="33px" />
        <col width="36px" />
        <col width="37px" />
        <col width="43px" />
    </colgroup>
    <tr> 
        <th id="h11" rowspan="2" >Planting Date</th>
        <th id="h12" colspan="2">Moldboard</th>
        <th id="h14" colspan="2">No-Till</th>
    </tr>
    <tr align="center"> 
        <th id="h22">0P/0K</th>
        <th id="h23">25P/25K</th>
        <th id="h24">0P/0K</th>
        <th id="h25">25P/25K</th>
    </tr>
        <tr align="center"> 
        <td id="h31" headers="h11">April 23-26</td>
        <td headers="h31 h12 h22">152</td>
        <td headers="h31 h12 h23">168</td>
        <td headers="h31 h14 h24">154</td>
        <td headers="h31 h14 h25">153</td>
    </tr>
    <tr align="center"> 
        <td id="h41" headers="h11">May 2-3</td>
        <td headers="h41 h12 h22">158</td>
        <td headers="h41 h12 h23">161</td>
        <td headers="h41 h14 h24">153</td>
        <td headers="h41 h14 h25">159</td>
    </tr>
    <tr align="center"> 
        <td id="h51" headers="h11">May 11-14</td>
        <td headers="h51 h12 h22">156</td>
        <td headers="h51 h12 h23">171</td>
        <td headers="h51 h12 h24">143</td>
        <td headers="h51 h12 h25">154</td>
    </tr>
    <tr align="center"> 
        <td id="h61" headers="h11">May 23-24</td>
        <td headers="h61 h12 h22">147</td>
        <td headers="h61 h12 h23">156</td>
        <td headers="h61 h14 h24">122</td>
        <td headers="h61 h14 h25">142</td>
    </tr>
</table>
Planting Date Moldboard No-Till
0P/0K 25P/25K 0P/0K 25P/25K
April 23-26 152 168 154 153
May 2-3 158 161 153 159
May 11-14 156 171 143 154
May 23-24 147 156 122 142

Form controls

Form controls should be identified using the label element or title attribute. See Success Criterion 1.1.1 for examples.

Related groups of controls should be placed within a fieldset to provide semantic groupings of controls. The legend element should be used within fieldset to provide a description for the group.

<fieldset>
    <legend>Contact Details</legend>
    <label for="name">Name:</label><input id="name" type="text" />
    <label for="name">Address:</label><input id="address" type="text" />
    <label for="name">Postcode:</label><input id="postcode" type="text" />
</fieldset>

<fieldset>
    <legend>Account Details</legend>
    <label for="accname">Account Name:</label><input id="accname" type="text" />
    <label for="accno">Account Number:</label><input id="accno" type="text" />
    <label for="sortcode">Sortcode:</label><input id="sortcode" type="text" />
</fieldset>
Contact Details


Account Details

Grouping dropdown list items

Items may be grouped in a selection list by using the optgroup element. It should be noted that support for this is inconsistent across screen readers.

<select name="teams" >
   <optgroup label="Aviva Premiership">
      <option value="Quins">Harlequins</option>
      <option value="Wasps">London Wasps</option>
      <option value="Irish">London Irish</option>
   </optgroup>
   <optgroup label="RFU Championship">
      <option value="Newcastle">Newcastle Falcons</option>
      <option value="Cornish">Cornish Pirates</option>
      <option value="bedford">Bedford</option>
   </optgroup>
</select>

Lists

Lists of related items should be created using list elements appropriate for their purposes. That is, use ol for ordered lists, ul for unordered lists and dl to group terms and their definitions.

Don't try and visually format a list with markup that doesn't suggest any kind of list relationship, for example:

* Item1 <br />
* Item2 <br />
* Item3 <br />

Headings

Heading tags h1...h6 are used to provide semantic code for headings in the content. These headings should be used in a hierarchical fashion where each subsequent lower value heading represents a subsection of the higher. Each lower heading generally will have a smaller default font-size but DO NOT be tempted in using these to style text at all, use CSS instead.

Failures

Not using the appropriate markup or text

Do not use presentation changes to force a certain style of presentation, use the appropriate markup. In the following example a p element is styled to make it appear like a heading. The appropriate header tag should be used instead. Don't forget, the appropriate markup can still be styled!

<style type="text/css">
.heading1 {
    font-size:200%;
    font-weight:bold;
}
.heading2 {
    font-size:150%;
    font-weight:bold;
}
</style>

<p class="heading1">Success Criteria</p>
<p>Lorem ipsum dolor sit amet, .................
</p>
<p class="heading2">Techniques</p>
<p>Sed ut perspiciatis unde omnis .................
</p>
<p class="heading2">Failures</p>
<p>At vero eos et accusamus et iusto .................
</p>

Ambiguous references in HTML

Failure here is where there is ambiguity on the web page possibily causing assitive technologies to present incorrect information. In the first example there is a duplicate reference for the accesskey attribute and in the second, the for attribute references a non-existent id.

<input id="first" accesskey="n" title="First name" type="text" />
<input id="last" accesskey="n" title="Last name" type="text" />
<label for="name" />
<input id="last" title="Last name" type="text" />

Using whitespace to produce columns

Assistive technologies will interpret content in the reading order of the current language so any whitespace used to manafacture columns instead of the correct structure will cause the technolgy to misread the content.

		
<p>
   Capital city of UK:                   Capital city of France:
   London                                Paris
   
   Capital city of Germany:               Capital city of Italy:
   Berlin                                Rome
</p>

In this example a screen reader would interpret the text as:

"Capital city of UK: Capital city of France: London Paris"

This is also particularly a problem when used in tables to format content. There is probably the likelihood that appropriate cells are not properly identified as header cells and data cells are unable to be associated with their header cells.

The pre element can also be used for visual formatting but once more any attempt to use it for tabular layout will only confuse assitive technologies.

JavaScript used to emulate a link

This failure is intened to highlight the situation where an attached JavaScript event is used to emulate a link on a non-link element e.g. span or div. In the case where this is intended to be a proper link the anchor element a should be used.

<span class="alink" onclick="this.location.href='newpage.html'">New page</span>
New page

I would add a word of warning here though. There are countless examples where JavaScript events are used on span or similar elements to perform some form of background processing (e.g. AJAX call) which does not involve any kind of navigation to another location. These should not be considered a failure in this particular case which relates to the W3C defined failure F42.

Using structural markup in a way that does not represent relationships in the content

This is typically seen where, instead of being used to represent a section of content, a header tag is used to emphasise styling for some content (i.e. embolden with larger font size). Another culprit as described above is the blockquote element being used to indent text.

Using specific elements and attributes in table layout

Whilst the use of tables for layout is not condoned, should there be an occasion when they are used, the summary attribute or the caption and th elements should not be used. In the following example you see that the summary provides a meaningless escription for the table and the th element is used inappropriately as the page header. Assitive technologies will try and associate the data cells to this header cell.

 <table summary="layout table">
 <tr>
   <th colspan=3>Page Title</th>
 </tr>
 <tr>
   <td><div>navigation content</div></td>
   <td><div>main content</div></td>
   <td><div>right sidebar content</div></td>
 </tr>
 <tr>
   <td colspan=3>footer</td>
 </tr>
 </table>

Label not properly associated with a form control

If a label element has not been used to associate the 'label' text shown with a particular control, assitive technologies may not be able to determine which label goes with which control in the following example.

First name:
<input type="text" name="firstname">
Last name:
<input type="text" name="lastname">
Male: <input type="radio" name="sex" value="male" />
Female: <input type="radio" name="sex" value="female" />

A label element may have been used but if it does not explicitly reference the control assitive technologies may still be unable to determine which label with which control.

<label>First name:</label>
<input type="text" name="firstname">
<label>Last name:</label>
<input type="text" name="lastname">
<label>Male:</label> <input type="radio" name="sex" value="male" />
<label>Female:</label> <input type="radio" name="sex" value="female" />

A similar example would be where implicit labels have been used.

<label>First name: <input type="text" name="firstname"></label>
<label>Last name: <input type="text" name="lastname"></label>
<label>Male: <input type="radio" name="sex" value="male" /></label>
<label>Female: <input type="radio" name="sex" value="female" /></label>

In those situations where it is not possible to use a label element, the title attribute must be used instead. If it is not present, the name of the control cannot be established. This only applies to the text box in the following example as a name is associated to a button by its value.

<input id="searchbox" type="text" /><input type="submit" value="Search" />
Top