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