0

I work for a website design company and we have a lot of flash projects and clients constantly embed iframes to Facebook, etc.

For example, when I do my test using a screen reader it seems like it's a bad user-experience when you get into an Iframe because most Facebook feed embedded load forever and you might even get stuck into an ajax loading iFrame.

I want to know if it's considered bad practice to hide flash/ iframes elements from screen readers using aria-hidden? Also, does it makes my website accessible by hiding them?

Thanks!

Gcamara14
  • 510
  • 4
  • 14
  • Please remember that not all screen reader users are blind. http://adrianroselli.com/2017/02/not-all-screen-reader-users-are-blind.html – aardrian Jun 27 '17 at 18:11

3 Answers3

0

I think unconditional hiding is not good an idea. All user have the right to see all the same contents.

  1. you can add a link to skip the iframe above the iframe like below.

    <a href="#skipfacebook" class="blind">skip facebook feed</a>
    <iframe></iframe>
    <div id="skipfacebook" name="skipfacebook">Next content</div>
    
  2. I don't know which screen reader you use, but as I know, you can skip iframe using screen reader since the screen reader has a lot of hotkeys like 'see all links'. for example, you can move to the previous element with [Alt+.] and you can move to next elements with [Alt+,] in a screen reader I know.

VvV
  • 1,548
  • 12
  • 18
  • `aria-hidden="true"` is an explicit instruction to browsers for visually impaired people that a particular element will not be useful to them. Hiding is its entire purpose, and it's a very good idea to use it where appropriate. – ceejayoz Jun 26 '17 at 23:47
  • 2
    @ceejayoz I don't agree with you. Unconditional hiding is not good. you can't read the content with area-hidden=true with a screen reader. You should use area-hidden=true, if the contents useless for users using a screen reader, for example, dimmed layer. I think the facebook feed is important in their contents and you need to offer all the same content to all users. Week-eyed people can use screen reader so it is better not hiding the content as well. – VvV Jun 27 '17 at 00:03
  • Yeah that's a great point, unconditional hiding is not good and not fair. But what about flash, should aria-hidden be used on Flash elements? – Gcamara14 Jun 27 '17 at 19:50
  • @Gcamara14 It depends on content. If the Flash just shows a visual scene without text like a mountain, you can hide it. However, if it is kind of menu or text, you don't need to hide it. some screen reader can read text on Flash as well. You can add alternative text on the button or graphic object in Flash. – VvV Jun 28 '17 at 02:52
0

It depends mainly on the situation.

If your iframe is not visible (serving as an ajax proxy for technical cross-origin matters for instance), aria-hidden may be required (when setting display:none is not possible).

In many other cases, iframewill consist of visible and interactive elements.

Hiding with aria-hidden will make it impossible to read, for instance, for a person using a screenreader which may select the iframe wanting to read the inner content.

Of course this requires the content of the iframe to be accessible. If it's not, then it's better to use aria-hidden and provide an accessible alternative.

Chris Calo
  • 7,518
  • 7
  • 48
  • 64
Adam
  • 17,838
  • 32
  • 54
  • Ah I see thank you for your answer, it explains a lot, but what's your take on the flash elements? – Gcamara14 Jun 27 '17 at 19:49
  • Flash player has integrated support for screen access technologies (http://www.adobe.com/accessibility/products/flashplayer.html). So the answer will be the same as for an `iframe`. If your flash object has text inside and is visible on screen, you should give accessibility support to it. Otherwise, you may hide it if it's purely decorative for instance. – Adam Jun 28 '17 at 07:13
0

If content or functionality is usable by one group of people, it should be available to everyone. If you're serving up inaccessible content inside an iframe, hiding it so blind users don't know it's there isn't your "get out of jail free" card, it's a breach of the Web Content Accessibility Guidelines, and depending on what country you live in it could be a breach of your accessibility law.

As someone said above, if the iframe content is purely decorative, then hiding it would be OK, but if it contains important information or interactive elements, then pretending to one group of users that it doesn't exist is not an option.

a11y_guru
  • 220
  • 3
  • 9