Natalia Garrido474 Points
Footer Accessibility Question
I was reading the MDN footer article that's linked in the teacher notes and it noted that the VoiceOver screen reader has issues with not announcing the footer landmark role. The article recommends adding role="contentinfo" to the footer element.
My question is what it would look like. I want to use it properly but couldn't find an example on how it would look in functioning code.
They had a link to WebKit Bugzilla about it that went straight over my head.
Would the code I put below work?
<footer role="contentinfo"> <p>Here is my footer.</p> </footer>
Also, is "contentinfo" asking for a description like I would for an alt tag or is it what gets the reader to recognize the footer?
I know this is only a related question- would there be a better place to ask?
Lachlan Stevens10,762 Points
The example you've provided is the correct way to add the role to a footer tag.
contentinfo is the actual content that is in the attribute, rather than being a placeholder for something else. The screenreader is actually looking for
contentinfo to be present in the tag.
Note that this is is only really required for safari - Firefox and Chrome both automatically apply the
contentinfo role to footer tags except for a couple of special cases (for example if the footer tag is a child of an