Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a default title on the Iframe #32

Closed
thedaviddias opened this issue Nov 20, 2017 · 3 comments
Closed

Add a default title on the Iframe #32

thedaviddias opened this issue Nov 20, 2017 · 3 comments
Labels

Comments

@thedaviddias
Copy link

When I analyze with Lighthouse my website which use github-buttons, it alerts me about an accessibility issue (https://dequeuniversity.com/rules/axe/2.2/frame-title).

Can you add a default title on the iframe HTML tag to avoid that flag?

@ntkme
Copy link
Contributor

ntkme commented Nov 20, 2017

The justification for adding it was documented in WCAG 2.0 H64:

This provides a label for the frame so users can determine which frame to enter and explore in detail.

In the old days when web page layouts were constructed by <frame> elements, the title attribute was quite useful because screen reader users would use that to skip through frames which might have tons of irrelevant content.

However, we are not in the old days any more. The use case of <iframe> today has changed dramatically. Modern browsers consider <iframe> as a seamless part of the parent page, such that a title attribute for screen readers would become irrelevant, because it breaks the seamless integration. Browsers do not render the tooltip for title attribute when hovering <iframe>, and newer version of screen readers won't read out title on <iframe> as well. Although title attribute on <iframe> was intended for humans, only bots will see those nowadays.

It might be useful for old browsers / screen readers, but HTML is an evolving standard. Nowadays we put aria-label on the elements within the <iframe> to provide an explicit accessible version for screen readers.

I don't feel that we should add title just to bypass a linter warning.

@ntkme
Copy link
Contributor

ntkme commented Feb 3, 2018

@thedaviddias Now if you add a title attribute on the button's <a>, the title will be copied to <iframe>.

@thedaviddias
Copy link
Author

Thanks @ntkme, I'll try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants