Basic Images

Images, such as a photograph, drawing, diagram, etc., are used to provide visual flair or to convey important information.
Challenges disabled users face with images are:
- Missing text descriptions for blind users
- Difficult to see due to bad color contrast
Example
-
Alternative text is provided for all images
Regardless of whether an image is decorative or informational it must have an alt attribute:
default.htm (excerpt)<!—Decorative Images --> <img alt="" src="img/bullet.gif" /> <img alt="" src="img/spacer.gif" /> <!—Informational Images --> <li> <a href="#" title="Link 1 New Item">Link 1</a> <img alt="New Item" src="img/new.gif" /> </li> <li> <a href="#" title="Link 3 Updated Item">Link 3</a> <img alt="Updated Item" src="img/update.gif" /> </li> … <img alt="Pie Chart depicting Access Keys usage" src="img/chart.png" /> -
Complex images have a detailed description
Complex images (e.g., pie chart, screenshot, etc.) must have a description with them so that a blind user understands what's being shown. In our example, data associated with a pie chart is shown/hidden using the 'View Details' button:
default.htm (excerpt)<div id="pieChartImage"> <h3>Pie Chart</h3> <p><img alt="Pie Chart depicting Access Keys usage" src="img/chart.png" /></p> <p class="center"> <button id="pieChartBtn" title="View Details for Access Keys Pie Chart">View Details</button> </p> <table class="hide" id="pieChartTable" summary="Access Keys Usage Survey Response"> <caption>I use access keys...</caption> <thead> <tr> <th scope="col">Response</th> <th scope="col">% of Respondents</th> </tr> </thead> <tbody> <tr><td>Whenever they're available</td><td>22%</td></tr> <tr><td>Often</td><td>13%</td></tr> <tr><td>Sometimes</td><td>24%</td></tr> <tr><td>Seldom</td><td>20%</td></tr> <tr><td>Never</td><td>16%</td></tr> <tr><td>No Response</td><td>5%</td></tr> </tbody> </table> </div><-- end #pieChartImage -->
images.js (excerpt)/* Capture Button Title Attribute */ var arr = []; $("button").each(function (i) { arr[i] = $(this).attr("title"); }); /**************************************/ /* PIE CHART TOGGLE */ /**************************************/ $("#pieChartBtn").click(function () { $("#pieChartBtn").text() == "Hide Details" ? hidePie() : showPie(); }); /* Hide Function */ var hidePie = function () { $("#pieChartBtn").text("View Details"); $("#pieChartBtn").attr("title", arr[0]); $("#pieChartTable").removeAttr("tabindex"); $("#pieChartTable").hide(); } /* Show Function */ var showPie = function () { /* Swap Out Title text */ var titleText = $("#pieChartBtn").attr("title").replace("View", "Hide"); ; $("#pieChartBtn").text("Hide Details"); $("#pieChartBtn").attr("title", titleText); $("#pieChartTable").attr("tabindex", "0"); $("#pieChartTable").show(); $("#pieChartTable").focus(); } -
Ensure high color contrast is used for any imaged text
For imaged text ensure that the text color contrasts well from any background color. A good rule of thumb is this:
- for a light background, use dark text
- for a dark background, use light text
The easiest way to check for high contrast is by using a Color Contrast tool. Here are two popular products on the web:
-
Alternative text is provided for all images
Web Accessibility Toolbar
- Select Images
- Select Show Images
- Verify alt attribute is:
- EMPTY for Decorative Images
- CONCISE for Meaningful Images
-
Complex images have a detailed description
Visual Inspection
- Check for an embedded text description before or after the image
- If none is provided, check for a link or button to open up a description of the image
-
Ensure high color contrast is used for any imaged text
For images, a developer will need to run the colors used for the image through a contrast analyser.
Two popular products on the web are:
-
Alternative text is provided for all images
JAWS
- Press Ctrl + Insert + G to bring up a list of images
- Verify alt text is in place for any meaningful image
-
Complex images have a detailed description
NO TEST METHOD...
-
Ensure high color contrast is used for any imaged text
MAGic
- Turn magnification on and magnify 6-8 times
- If you see pixilation, check to see if there is alt text to compensate for the image



