让 JAWS 忽略 html 元素

发布于 2024-10-18 23:41:50 字数 306 浏览 4 评论 0原文

我目前正在尝试使我的应用程序对那些视力有困难的人来说更加用户友好。正如人们所料,我正在使用 JAWS 来测试我的应用程序。我遇到的大多数问题都相对容易解决,但我被一个问题难住了。

在我的应用程序中,我通过 iframe 注入了广告,我希望 JAWS 忽略它们,但我仍然希望它们显示(display:none 是不可能的)。有没有办法让 JAWS 完全忽略一个元素及其所有子元素?

我看到一些帖子导致了 talk:none,但这不起作用。它似乎确实忽略了父级 div,但它会读取 iframe 子级的内容。

任何提示将不胜感激。

谢谢。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

泪眸﹌ 2024-10-25 23:41:50

非常适合您测试 Web 应用程序的可访问性。

JAWS 已经内置了通过暂时或永久忽略内联 iframe 来忽略广告的功能。

测试您的网站在切换该功能的情况下是否能正常工作应该代表 JAWS 用户的典型体验。

横幅广告

如果您希望 JAWS 暂时忽略页面上的横幅广告,请执行以下操作:

  1. 按 INSERT+V。
  2. 按 I 直至选择“内嵌框架显示 - 开启”。
  3. 按空格键选择“内嵌框架显示 - 关闭”。
  4. 按 Enter 键。

要让 JAWS 永久忽略所有内嵌框架,包括您可能遇到的横幅广告:

  1. 在 Internet Explorer 中,按 INSERT+F2。
  2. 选择“设置中心”,然后按 ENTER。
  3. 焦点位于“搜索”编辑框中。输入“ignore inline”(不带引号)。
  4. 按向下键移至“设置中心”树视图的筛选结果中的“忽略内嵌框架”。
  5. 按空格键选中或取消选中该复选框。
  6. 按 TAB 移至“确定”按钮并使用空格键激活它。更改已完成并保存。设置中心关闭。

上面链接中提到的其他要点将使您了解要避免的其他不良做法。

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.

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

策马西风 2024-10-25 23:41:50

将 ARIA 属性 aria-hidden="true" 赋予 iframe 的外部 div。理想情况下,这应该对 JAWS 隐藏内容。

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

深海不蓝 2024-10-25 23:41:50

将 aria 属性 role="presentation" 赋予您想要忽略的任何元素。 Jaws不会读它们。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文