Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
>> Another type of image that is common on older pages is the image map where multiple pieces of the same image are linked to different locations. Image maps need alt text to but it's handled a little differently than on regular images. If you are following along with the exercise files open imagemap.html in Dreamweaver, it is located in the 0604 folder of the chapter six exercise files. This is the same table based version of the home page that we worked on in the last movie.
However in this move the navbar is not made up of individual images but of one single images with multiple areas linked. It's important for this image to have alt text because it is conveying a lot of important information but we can't give it an alt value of the location of all of the links it contains. Instead we would want alt text on each of the individual areas of the image map so click on the navimage and in the properties inspector click on the alt menu and select empty.
Now the navimage will be skipped over but we are going to set alt text on the linked area within it instead. Click on the first of those linked areas over the text residents, the properties inspector changes to show you where this area of the image map is linking to. There is also a field for alt it is empty meaning this area currently does not have any text set on it. Click inside the alt field and type residents, note that we haven't added any alt text to an image.
If we look in the text selector the tag that we are currently editing is the area tag inside the map tag. So its not just image elements that need alt text but also area elements within image maps. If you needed to add alt text to image maps throughout a site you could again use Dreamweaver's find and replace to speed up the process. Go to the edit menu in Dreamweaver and click on find and replace, leave current document selected for the fine in option but if you were doing this on a real site you would click on this menu and choose entire current local site.
In the search menu choose specific tag, the values from the last time we used the find and replace dialog box are still saved for us. But this time we are going to have to make some changes. The tag we are looking for this time is not the IMG tag it's the area tag. So click on the arrow of the menu scroll up to the top of the list and select area, we are still looking for tags without alt attributes so the next set of menus should still say without attribute in alt.
in the next menu leave with attributes selected but we need to change the source value that is currently selected in the adjacent menu. Areas do not have SRC attributes instead they have ATRIF attributes to point to there links, so click on the arrow of that menu and select ATRIF from the list. Next to the equals menu leave the period and asterisks in place. As before we want to find this tag no matter what the path to its link is.
So just highlight over the portion of the text that says logo.gif and type residents.html now this will look for any area tag without an alt attribute that is linking to the file residents.html. For action we need to keep the set attribute option selected in the first menu, in the next menu also keep the alt attribute option selected. In the final menu next to the word two we need to type in the new text we want for each of these are tags.
Highlight over the existing text and type residents. Make sure use regular expression is still checked. Now click on replace all. We will get zero results because we have already added the alt text to the resident's area of this image map. That lets us know that our search was functioning correctly. It didn't match this area tag because it didn't meet the requirement of have no alt attribute. Let's try it with one more area tag, click on the business area of the navimage in the design view of Dreamweaver.
You will see that it is linking to a file named business.html and that it currently doesn't have an alt value set, if we look in the properties inspector. Go to the edit menu and select find and replace, leave current document selected for find in and for search choose specific tag, the only values that we need to change here is the ATRIF value that we were trying to match against as well as the alt text we want to set. So beside the equal menu highlight over just the text that says residents and type business so that now the full text of this field is period, asterisks business.html.
In the field below labeled two highlight over the existing text and type business. Now click replace all. This time we did get a match because the business are of this image map did not yet have alt text set. We can see in the results panel that it does now. So when dealing with image maps make sure that you do set an empty alt attribute on the main image so that the screen reader will skip over it but set meaningful alt attributes on each of the are tags within the image map.
Get unlimited access to all courses for just $25/month.Become a member
58 Video lessons · 59226 Viewers
61 Video lessons · 92190 Viewers
82 Video lessons · 104058 Viewers
56 Video lessons · 106759 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.