WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: iframes and alt attribute

for

From: Léonie Watson
Date: Mar 16, 2016 1:26PM


> From: Jonathan Avila [mailto: <EMAIL REMOVED> ]
> Sent: 16 March 2016 19:10
>
> > You can use either. Both alt and title attributes can be used to give the
> frame an accessible name, which is the goal in this instance. The title
> attribute is more commonly used with frames though.
>
> To my knowledge the alt attribute is not valid on an iframe. Alt is not a global
> attribute unlike the title attribute and other aria attributes. Perhaps this has
> changed or perhaps if the iframe was only an image resource had a role of
> img I could see this but otherwise this seems non-standard.

You're right! It isn't a global attribute. I must admit I didn't check the spec, just threw a quick test together - where oddly the alt attribute seems to do the job in FF, Chrome and IE.

Léonie.

--
@LeonieWatson tink.uk Carpe diem.