axe-core
axe-core copied to clipboard
Rule idea: No duplicate alt on area
Image maps should not have different area elements on the same img, with the same accessible text.
I believe this is solved by identical-links-same-purpose https://github.com/dequelabs/axe-core/blob/develop/lib/rules/identical-links-same-purpose.json#L3
This needs to be a definitive failure and not a needs review issue. So we need to modify the existing rule to not raise issues for duplicates inside the same <map> and only raise needs review items across <map> and <a> and have the new rule raise a violation only within the same <map> only.
<html>
<head>
<title>Image map examples</title>
</head>
<body>
<h3>Violation (new): same alt, different URL</h3>
<img src="http://www2.hawaii.edu/~donnab/lis670/isle1_isle2_small.GIF" width="194" height="194" alt="image map" usemap="#isles">
<map name="isles" id="isles">
<area shape="rect"
coords="0,0,96,96"
href="isle1_info.html"
alt="Click here to get information about Aisle 1"
>
<area
shape="rect"
coords="97,97,194,194"
href="isle2_info.html"
alt="Click here to get information about Aisle 1"
>
</map>
</body>
</html>
@goodwitch can you check this - I could not find very explicit testing instructions
@dylanb I am going to run this by the Jedi Council. I've posted a copy of this page at http://glendathegood.com/a11y/imagemap.html and dropped this question on the JC agenda.
In the process of getting Jedi Council vote here: https://docs.google.com/document/d/1fpLzQcR_g-H7mY4tWkwTPkQvXEPNlYRZra5EY4ko2K8/edit
@dylanb here is the formal answer from the Jedi Council:
Jedi Council Vote (1) Failure (new): same alt, different URL
- Aparna: +1
- Glenda: +1
- Melanie: +1
- Paul: +1
- Wilco: 0 - why are we spending time creating rules for something that people don’t use (image maps)?
(3) Needs review (new): same alt, same URL
- Aparna: -1, I echo Glenda’s thoughts and additional info may give me more clarity as to does this really matter or not.
- Glenda: -1 (while I can see that visually the island 2 area should logically resolve to a different URL...it is quite possible that an image map would have two areas that link to the same URL..with the same alt text (just like a web page can have multiple links on the same page with the same link text to the same URL). So...I think this could be a noisy/annoying “needs review” that might not be particularly helpful.
- Melanie: -1 - when would this ever be an accessibility issue vice a usability issue or development mistake.
- Paul: -1
- Wilco: -1 - coding mistake, not an accessibility issue. Affects all humans (not just people with disabilities)
ok, have modified the HTML to reflect what we need to catch
@goodwitch @WilcoFiers @dylanb @isner Matt and I were looking at this rule this morning. Based on the Understanding doc for 2.4.4, specifically this paragraph below , I think we need to revisit our Jedi Council decision:
"It is a best practice for links with the same destination to have consistent text (and this is a requirement per Success Criterion 3.2.4 for pages in a set). It is also a best practice for links with different purposes and destinations to have different link text."