Have JAWS ignore an html element

时光毁灭记忆、已成空白 提交于 2019-12-07 15:09:10

问题


I am currently attempting to make my application be more user friendly to those with difficulty seeing. As one would expect, I am using JAWS to test my application. Most of the issues I have run in were relatively easy to fix, except I am stumped on one.

In my application, I have advertisements injected via an iframe and I want JAWS to ignore them, but I still want them to display (display:none is out of the question). Is there any way to have JAWS completely ignore an element and all of its children?

I saw a few posts leading towards speak:none, but that does not work. It does seems to ignore the parent div, but it will instead reads the content of the iframe child.

Any tips would be greatly appreciated.

Thank you.


回答1:


Good for you for testing your web application for accessibility.

JAWS already has the feature built-in to ignore ads by temporarily or permanently ignoring inline iframes.

Testing that your site works nicely with that feature toggled should represent the typical experience for a JAWS user.

Banner Ads

If you want JAWS to temporarily ignore banner ads on a page, do the following:

  1. Press INSERT+V.
  2. Press I until you select "Inline Frames Show - On."
  3. Press the SPACEBAR to choose "Inline Frames Show - Off."
  4. Press ENTER.

To have JAWS permanently ignore all inline frames, including banner ads that you might encounter:

  1. In Internet Explorer, press INSERT+F2.
  2. Select Settings Center, and press ENTER.
  3. Focus is in the Search edit box. Type in "ignore inline" without the quotes.
  4. Press DOWN ARROW to move to Ignore Inline Frames in the filtered results of the tree view in Settings Center.
  5. Press SPACEBAR to check or uncheck the check box.
  6. Press TAB to move to the OK button and activate it with the SPACEBAR. The changes are made and saved. Settings Center closes.
  • http://www.freedomscientific.com/Training/Surfs-up/difficult_pages.htm

The other points mentioned on the above link will give you a good idea of additional bad practices to avoid.




回答2:


Give the ARIA attribute aria-hidden="true" to the outer div of the iframe. This should ideally hide the the content from JAWS.




回答3:


Give the aria attribute role="presentation" to any element you want ignored. Jaws will not read them.



来源:https://stackoverflow.com/questions/5107649/have-jaws-ignore-an-html-element

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!