WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Title attribute for iframes

for

From: Steve Green
Date: Sep 14, 2020 7:51PM


Thanks Jonathan. I understand why tools report it, but it sounds like a user agent issue. If I am correct, tools should flag it as a "best practice", not a WCAG violation.

You refer to the need for a focusable element to have a label, but I do not believe that is a WCAG requirement either. The definition of a "user interface component" means that SC 4.1.2 will almost never apply to an <iframe> element.

My argument isn't so much with tool vendors, it's with testers who copy and paste the results from the tool into the report they give the client without giving any consideration to whether the results are correct. We are currently defending a client against a claim from a third party who has done precisely that. In contractual terms, the only thing that matters is strict WCAG conformance - the user experience is irrelevant.

Steve


-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Jonathan Avila
Sent: 15 September 2020 02:15
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: Re: [WebAIM] Title attribute for iframes

The challenge is that in some browsers the iFrame appears in the focus order. Iframes (and in the past frames) may have been used to communicate a separate portion or pane of a site. Some iFrames are used for specific components, like text editors, video players and widgets. Thus, historically the industry have treated them like a component. If the iFrame was removed from the focus order and the content did not act like a user interface component that needed to be labelled then it might not need a name to meet the requirements -- but it's hard to tell this with an automated tool -- so it's safest to flag these.

Jonathan

-----Original Message-----
From: WebAIM-Forum < <EMAIL REMOVED> > On Behalf Of Steve Green
Sent: Monday, September 14, 2020 9:09 PM
To: WebAIM Discussion List < <EMAIL REMOVED> >
Subject: [WebAIM] Title attribute for iframes

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


It is very common for testers and automated tools to report a WCAG non-conformance if an <iframe> element does not have a "title" attribute. However, I cannot find anything in WCAG that requires this. Can anyone point me towards such a requirement?

The Deque axe tool reports the absence of a "title" attribute as a violation of SCs 2.4.1 Bypass Blocks and 4.1.2 Name, Role, Value, both of which are highly improbable. Digging into it, it turns out that axe is referring to https://www.w3.org/WAI/WCAG21/Techniques/html/H64, which is a technique that can be used in a couple of very specific situations, neither of which is applicable in most cases. Even then the "title" attribute is only a small part of a possible solution, not a requirement.

Furthermore, that page also says "The title attribute is not interchangeable with the name attribute. The title labels the frame for users; the name labels it for scripting and window targeting." Therefore, the absence of a "title" attribute cannot be a non-conformance of SC 4.1.2 (Name, role and value) even if that SC applied to <iframes>, which it does not (it only applies to "user interface components", which are defined as "a part of the content that is perceived by users as a single control for a distinct function").

The only SC I can find that could possibly require the "title" attribute is SC 1.1.1, but that seems to be a very long stretch for me. If all the contents of the <iframe> are fully WCAG conformant, why would the <iframe> need a text alternative? And if it does, why don't other containers such as <form> elements? Or <div>s?

Finally, I should mention that for the purposes of this discussion I am only interested in WCAG conformance, not screen reader behaviours, best practices or anything else.

As always, your thoughts would be very welcome.

Regards,
Steve Green
Managing Director
Test Partners Ltd
020 3002 4176 (direct)
0800 612 2780 (switchboard)
07957 246 276 (mobile)
020 7692 5517 (fax)
Skype: testpartners
<EMAIL REMOVED>
www.testpartners.co.uk

Connect to me on LinkedIn - http://uk.linkedin.com/in/stevegreen2