Long Description Example 2: Using aria-described by to point to a show/hide button
Blackberry Tree Heights
Blackbeery Tree Heights
Height
Frequency
60-65 feet
3
65-70 feet
3
70-75 feet
8
75-80 feet
10
80-85 feet
5
85-90 feet
2
Rembrandt's Painting Musical Allegory
Rembrandt's Painting Musical Allegory
Led by a young woman, a group of people are playing music in a room.
She is reading the music from the sheet, singing and beating time.
The two men are accompanying her on their instruments - the young man on the harp and the older man on a viola da gamba.
An older woman is reading over the girl's shoulder, listening attentively with her hand on her chin.
In the foreground is a violin, a lute and a pile of books.
This is an early work by Rembrandt from 1626.
He made it when he was twenty years old and signed it with the monogram RH: Rembrandt Harmensz.
The painting was only 'discovered' to be by Rembrandt in 1936.
Two vertical halves make up this panel; the join can be clearly seen in the centre.
Keyboard Shortcuts
Enter: Toggle between hiding/showing additional information
ARIA Roles and Properties
Roles:
The button element is used to get the implied role of button in the accessibility API
<div class="example">
<h2>Blackberry Tree Heights</h2>
<p>
<img
src="images/histogram.png"
alt="Histogram of Blackberry tree heights"
width="80%" aria-describedby="longdesc1"
/>
</p>
<p>
<!--
The button element is used to get the implied role of "button" in the accessibility API
-->
<button
class="showhide"
id="longdesc1" aria-label="Show or hide data for Histogram of Blackberry tree heights" aria-controls="desc1" >
<span>Show</span>
Data
</button>
</p>
<!--
The button element is used to get the implied role of "button" in the accessibility API
-->
<p>
<button
class="showhide"
id="longdesc2" aria-label="Show or hide description of Rembrandt's painting musical allegory" aria-controls="desc2">
<span>Show</span>
Description
</button>
</p>
<div
id="desc2" role="region"
aria-labelledby="desc2-label"
aria-expanded="false">
<h2 id="desc2-label">Rembrandt's Painting Musical Allegory</h2>
Led by a young woman, a group of people are playing music in a room.
She is reading the music from the sheet, singing and beating time.
The two men are accompanying her on their instruments - the young man on the harp and the older man on a viola da gamba.
An older woman is reading over the girl's shoulder, listening attentively with her hand on her chin.
In the foreground is a violin, a lute and a pile of books.
This is an early work by Rembrandt from 1626.
He made it when he was twenty years old and signed it with the monogram RH: Rembrandt Harmensz.
The painting was only 'discovered' to be by Rembrandt in 1936.
Two vertical halves make up this panel; the join can be clearly seen in the centre.
</div>
</div>