WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Title attribute for iframes

for

From: Joe Humbert (A11y)
Date: Sep 14, 2020 8:32PM


In the definition of "User Interface component", it states:

"Note

Multiple user interface components may be implemented as a single
programmatic element. Components here is not tied to programming techniques,
but rather to what the user perceives as separate controls. "

If an <iframe> has a tab stop it may be perceived as a individual control by
users and therefore would fall under the definition of a "User Interface
component".

Also an <iframe> element by its nature is a single element where it's
function is to load in and contain multiple other elements. An ARIA tablist
similarly contains multiple other interactive elements, would you not fail
the set of tabs under 4.1.2 Name, role and value if it did not have an
aria-label or aria-labelledby attribute?

If the same iframe is used on multiple pages and cannot easily be skipped
(possibly because the user does not understand without navigating into its
content because it has no title attribute), this could be a failure of 2.4.1
Bypass Blocks

I disagree with What you state here:

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 name attribute in HTML is not intended to be the equivalent of the text
node, it is the equivalent of a id or other programmatic/scripting
identifier. The Title attribute, however, was intended to serve as the
visual label (in certain cases ) and accessible name of this element. In the
HTML spec this is part of the definition " on interactive content, it could
be a label for, or instructions for, use of the element; and so forth. The
value is text." (https://html.spec.whatwg.org/#the-title-attribute)

Personally, in my own personal and professional testing, I have often
inadvertently navigated into an iframe often containing hundreds of lines of
code using screen readers. While the optimum solution would have been to
hide this content for these users or include it using another method, having
a title attribute would have given myself and other real world users a hint
when we first encountered the iframe that it should be skipped.


Thankx,
Joe Humbert
Accessibility Champion
Android & iOS Accessibility Novice

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

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

http://webaim.org/discussion/archives
http://webaim.org/discussion/archives
http://webaim.org/discussion/archives