Title attribute text is the same as alt text
-
The map image output by this widget may look like this:
<img width="550" height="450" alt="Click to open a larger map" title="Click to open a larger map" src="//maps.googleapis.com/maps/api/staticmap?key=...">
Having identical text in both the alt and title attributes is not ideal. This is your choice as the developer, but I’ll be changing it via the
gmw_widget_content
filter so my sites satisfy accessibility scans like https://wave.webaim.org/. That tool lists this an error and suggests,The title attribute value is used to provide advisory information. It typically appears when the users hovers the mouse over an element. The advisory information presented should not be identical to or very similar to the element text or alternative text.
I will leave the title attribute in place, and replace the alt attribute with the address I’m displaying in the map. I believe that’s an appropriate alternative text for this image instead of instructions for the user which do not appear in the image.
- The topic ‘Title attribute text is the same as alt text’ is closed to new replies.