我正在开发一个显示聊天列表的应用程序,需要将聊天记录放入虚拟缓冲区。聊天内容可以简单到一行文字,也可以复杂到文字加链接加图片。如果没有 role=document
,它不在缓冲区中,但如果有 role=document
,JAWS 在读取内容时(按下向下箭头后)读取“可点击”。内容不可点击,我不知道如何阻止它被阅读。
这是一个布局示例:
<div role="application" class="mainViewContainer">
<ul class="mainViewContent">
<li tabindex="0" class="chatViewContainer">
<div tabindex="-1" class="chatHeaderContainer">
<span class="offscreen" id="chat1">Chat content</span>
<div role="document" tabindex="0" class="chatContent" aria-labelledby="chat1">
Here's a message, huzzah!
</div>
</div>
</li>
<li tabindex="0" class="chatViewContainer">
<div tabindex="-1" class="chatHeaderContainer">
<span class="offscreen" id="chat2">Chat content</span>
<div role="document" tabindex="0" class="chatContent" aria-labelledby="chat2">
<div class="chatText>Document <a href="/link/artifact=12121">documentName.jpg</a> created </div>
<div class="documentView">
<img title="documentName.jpg" src="imgsrc">
<div class="documentItemDetails">
<a href="/link/artifact=12121&viewMode=EXPANDED" class="documentName">documentName.jpg</a>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
关于如何让 JAWS 读取 chatContent
div 没有“可点击”的任何想法?
我在 Windows 7 上的 JAWS 版本 15.0.6025(我相信它是最新版本)和 FF 26 中看到了这一点。
最佳答案
我遇到了同样的问题。显然,这是预期的行为,如 this URL 中所述。 .
Clickable Text : When you navigate to a grid cell that has its display style set to clickable text, JAWS reads the corresponding column header text and then the data content of the current cell.
希望对您有所帮助。
关于html - 将 role=document 添加到 div 会导致 JAWS 读取 "clickable",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21439262/