WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Accessible names of iframes

for

From: Glen Walker
Date: Aug 5, 2018 6:24PM


In looking at the accessible name calculation, you might make an argument for step 2D:

Otherwise, if the current node's native markup provides an attribute (e.g. title) or element(e.g. HTML label) that defines a text alternative,...

There is a title attribute on the iframe. (Although I think the title attribute is a confusing example in the spec because the last step, 2I, says that's when to use the tooltip attribute).

I don't think the <title> element is considered a "text alternative" element like a <label> is so it might be hard to argue that that element should be used in the accessible name calculation.

Further, step 2F says the accessible name can come from the text content if the role allows it, but the only roles allowed for iframe are document, application, and img, none of which allow "name from content", so you probably can't get the iframe's name from the <title> element.

However, all that being said, I like what jaws is doing and getting the <title> element. It helps the end user despite what the developer should have done.

Sent from my iPhone

> On Aug 5, 2018, at 4:49 PM, Birkir R. Gunnarsson < <EMAIL REMOVED> > wrote:
>
> Hey guys
>
> We're displaying information from a third party vendor via an iframe.
> The iframe pulls in info from a different page.
> The page has its own <html> element and <head> element with a <title>
> aXe complains the iframe has no accessible name (because the <iframe>
> element does not have a title attribute).
>
> The question I have is whether the iframe can have an accessible name
> from the <title> element. Jaws always assigns the value of the <title>
> element as the accessible name of an <iframe> even if the <ifame> has
> a title attribute.
>
> This is not a big deal but I am a bit confused what the HTML syntax
> rules are and whether an iframe's accessible name can only come from
> the title attribute or can come from the <title> element.
>
>
> --
> Work hard. Have fun. Make history.
> > > >