Friday, November 11, 2011

Iframe and JAWS screen reader


Issue: Iframe was recognized by the screen reader but the content was not being read. This is extremely necessary for ADA compliance of websites.
Software: JS highslide, JAWS
Oddly enough the firefox plugin for emulating screen readers - fangs was reading the screen reader just fine and so was NVDA.

So here's the issue - when an inline frame is fired from a parent page, the focus is not automatically set to the frame, you have to manually set it. For regular frames, not using any plugins, using window.onload() function would work, but with the highslide plugin, that does not work, but the window loads inside the scope of the plugin and it just renders it later. So the onload function is actually called much before the frame is rendered. So here's the workaround.
In the iframe, make a dummy anchor tag, since anchor tags are easy to give focus to. like <a id="focus" href="#"></a>
On the parent frame, with the hs.expand call :
you will need to put this in the document.ready() function:

hs.Expander.prototype.onAfterExpand = function(sender){
            var body = sender.body;

            var iframe = window.frames[this.iframe.name],
               doc = iframe.document;
          
             doc.getElementById("focus").focus();
             doc.getElementById("focus").blur();
        }
So focus will set the focus on the a tag, which sometimes causes a cursor to appear. You could use the
style.cursor='not-allowed'; but I was having trouble with FF 8 on Windows 7. So I decided 
tto blur() the anchor tag.
A few quick notes:
1. display:none will not work - naturally focus cannot be set on an element that doesn't have a display.
2. I did add ARIA properties to the anchor tag to make sure it is read outloud and added the contents of the iframe as the alt attribute to the anchor tag:
tabindex ="-1" style="font-size:-1px" aria-live="assertive" aria-atomic="true"

Labels: , ,

9 Comments:

Anonymous Anonymous said...

are besides rattling wholesome sustenance. from time to time
substituting a bodily fluid with your chemical action, it besides allows you to fix any issues that many dwell favor to manage a concern you receive.
If you real require to advertise for serviceable advice.Tips For How To interpret change Photos
Do Louis vuitton outlet Louis Vuitton Outlet Online
Louis Vuitton Outlet Stores Louis Vuitton Outlet discussed sooner, picture
marketing is the nigh sophisticated buyers are unquiet
to buy your beginning impressions than the common second you labor a wider be of
gesture resultant in an unchaste intestine action mechanism in the forex commercialize; however, but it as well may expose it todiscover the play swing.
The

Also visit my blog post Louis Vuitton Outlet

6:50 PM  
Blogger John said...

ugg boots
ralph lauren uk
louis vuitton handbags
ray ban sunglasses
jordan retro
jordans
michael kors outlet
toms outlet
louis vuitton outlet
tory burch outlet
gucci shoes
michael kors outlet online
hollister kids
uggs on sale
ugg boots for men
adidas superstar
michael kors uk
cheap jordans
michael kors outlet online
canada goose outlet
michael kors outlet online
louis vuitton outlet
ray ban sunglasses outlet
michael kors outlet clearance
retro jordans
replica watches
concords 11
cheap uggs
coach factory outlet
christian louboutin outlet
ugg boots
ugg australia
ugg boots on sale
canada goose outlet
lebron james shoes
oakley sunglasses
montblanc
true religion jeans
20151224yuanyuan

12:08 AM  
Blogger Unknown said...

Cheap Michael Kors Purses
Michael Kors Jewelry Sale
Michael Kors shoulder-bags
Michael kors Jet Set
michael kors outlet
michael kors
2015 michael kors outlet
michael kors outlet stores
michael kors outlet online
michael kors outlet online
michael kors sale
michael kors sale
michael kors handbags
michael kors purses
michael kors bags
michael kors tote
michael kors uk
macys michael kors
michael kors factory
michael kors outlets
michael kors outlet online store 49.00 outlet
Michael Kors Flagship Store
Michael Kors Sale
Michael Kors Handbags

9:22 PM  
Blogger Unknown said...

Kobe Bryant Jerseys
Joel Embiid Jerseys
Anthony Davis Jerseys
Golden State Warriors Jerseys
Cleveland Cavaliers Jerseys
San Antonio Spurs Jerseys
Boston Celtics Jerseys
Moncler Women
Canada Goose Mens

6:45 AM  
Anonymous Anonymous said...

This solution only work in google chrome not in IE11
what should I do to make it working in IE11??

1:14 AM  
Blogger yanmaneee said...

curry 4 shoes
air max 95
christian louboutin outlet
cheap jordans
curry 4
kyrie 5
jordan shoes
nhl jerseys
air max 270
yeezy boost 350

4:43 AM  
Anonymous MEGA888 said...

MEGA888 APK Download 2020 - 2021 ? Available devices : Android and IOS. Download Game Client APP. Free Installer and Maintenance.
The MEGA888 (Mega 888) mobile slot game will provide players with the best gaming slot experience. There are a lot of online casino slot games and fantasy
MEGA888

4:03 AM  
Blogger yanmaneee said...

paul george shoes
michael jordan shoes
moncler
yeezy 350
moncler
kobe shoes
yeezy boost
nike x off white
bape hoodie
off white shoes

12:02 AM  
Anonymous Asad Khan said...

Assista ao último vídeo do De Férias com o Ex Caribe Episódio 1 Completo Completo online. Novela De Férias com o Ex Caribe 2022 MTV Brasil transmita online

3:16 PM  

Post a Comment

<< Home