Jquery Mobile 列表视图禁用画外音
使用 jQuery Mobile listview 构建一个具有主导航的网站,该网站在浏览器(例如移动 safari)上运行良好,直到启用语音等功能,然后导航被禁用,因为 jQuery mobile 添加了 aria-hidden="true"
有没有办法停止 jquery mobile 添加这个或更好的方式来允许此类用户浏览我的网站?
当前代码示例:
<ul data-role="listview" data-theme="f">
<li><a href="page1.html" role="link"><img src="image1.gif" alt="Test Image" />
<h3>Heading</h3><p>Description</p></a></li>
</ul>
添加:我认为这是问题的原因。
<div class="ui-btn-inner ui-li" aria-hidden="true">
jQuery mobile在
Building a site with the main navigation using jQuery Mobile listview which works fine on the browsers (e.g. mobile safari) until voiceover etc is enabled whereupon the navigation is disabled because jQuery mobile adds in an aria-hidden="true"
Is there any way to stop jquery mobile adding this or a better way to allow such users to navigate my site?
example current code:
<ul data-role="listview" data-theme="f">
<li><a href="page1.html" role="link"><img src="image1.gif" alt="Test Image" />
<h3>Heading</h3><p>Description</p></a></li>
</ul>
jQuery mobile adds:
<div class="ui-btn-inner ui-li" aria-hidden="true">
inside the <li>
which I think is the cause of the problem here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我有同样的问题。
当锚点添加到列表视图时,iPhone 中的画外音不起作用。
如您所知,画外音在 alpha4 中有效。
无论如何,我下载了 http://code.jquery。 com/mobile/1.0/jquery.mobile-1.0.min.js 并将
("aria-hidden","true")
更改为("aria-hidden","false")
。并将修改后的js上传到我的服务器上。
画外音起作用了。
我不知道此更改是否会影响其他功能。
不过,到目前为止还不错。
希望这会有所帮助。
I had the same issue.
When anchor was added to the listview, voiceover in the iphone didn't work.
As you may know, voiceover worked for alpha4, though.
Anyway, I downloaded http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js and changed
("aria-hidden","true")
to("aria-hidden","false")
.And uploaded the modified js to my server.
And the voiceover worked.
I have no idea if this change may affect other functionality.
However, so far so good.
Hope this would help.