GWT div aria-hidden不隐藏在IE [英] GWT div aria-hidden not hiding in IE

查看:124
本文介绍了GWT div aria-hidden不隐藏在IE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用GWT编制了目标网页。在IE中,我得到这个空的乐队在它的末尾(我画的是绿色,以便你可以看到它):





这只发生在IE(我用IE9测试)。不在Chrome中,不在Firefox中,不在Safari中。



检查DOM,负责此区域的是以下div:





由于某种原因,显示:none; 内联规则无效。如果我取消选中它并再次检查它,绿色带消失了!



但我不会要求我的用户每次他们加载我的登陆页面,所以有一种方法来摆脱这个div(显然是由GWT生成),或者使内联样式 display:none; 工作??



谢谢!



其他说明
我没有编写aria-hidden HTML divs,它们由GWT生成。我只是观察到他们负责我想要删除的绿色带。观察结果来自以下事实:当我取消选中IE DOM查看器中的 display:none; 属性,然后再次检查它时,绿色条带消失。

aria-hidden 和你的问题,你可能使用的属性不正确。该属性告诉用户使用屏幕阅读器忽略元素内的内容,并且应该与 visibility:none 结合使用。有关于告诉用户现在可以看到 div ,这可能是一个好的阅读。接受答案的作者写了一篇博客帖子


I programmed my landing page with GWT. In IE I get this empty band at the end of it (I painted it in green so that you can see it):

This only happens in IE (I'm testing with IE9). Not in Chrome, not in Firefox, not in Safari.

Checking out the DOM, the responsible for this area is the following div:

For some reason, the "display:none;" inline rule is not working. If I uncheck it and check it back again, then the green band disappears!!

But I'm not gonna ask my users to do that each time they load my landing page, so is there a way to get rid of this div (apparently generated by GWT), or to make the inline style "display:none;" work??

Thanks!

Additional explanation: I didn't write the aria-hidden HTML divs, they were generated by GWT. I just observed that they are responsible for the green band that I want to remove. The observation comes from the fact that when I uncheck the display:none; property in the IE DOM viewer and then check it back again, the green band disappears.

解决方案

From what I am understanding about both aria-hidden and your question, you may be using the attribute incorrectly. The attribute tells people using screen readers to ignore the content within the element, and should be used in conjunction with visibility:none. There was a question about notifing users about a now visable div that may be a good read. The author of the accepted answer wrote a blog post about it as well.

这篇关于GWT div aria-hidden不隐藏在IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆