HTML 文档标记以实现可访问性
我想知道构建类似文档的 html 页面的正确方法。显然,页面标题应标记为
,章节标题应标记为
。
。至于页脚,现在,我有:
<div id="footer">Footer content</div>
这将显示在文档的每一页中。我意识到屏幕阅读器在阅读页脚内容时不会通知用户。我觉得用户应该可以选择跳过阅读页脚内容。
是否有必要让屏幕阅读器宣布它将读取页脚内容,并且有适当的方法吗?
谢谢!
I was wondering about a proper way of structuring a document-like html page. It's obvious that the title of the page should be marked as <h1>
and section headings as <h2>
.
As for the footer, right now, I have:
<div id="footer">Footer content</div>
and this will be displayed in every page of the document. I realized that screen reader will not notify the users if it's reading the footer content. I feel that uses should have the option to skip reading the footer content.
Is it necessary to let screen reader announce that it's going to read the footer content and is there a proper way to do so?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
允许屏幕阅读器跳过网站重复部分的常见方法是在您要跳过的元素后面的位置添加隐藏的锚点。
例如,在我们的一个网站上,我们这样做是为了允许跳过导航栏。
可以使用键盘选择“跳过导航”
a
,屏幕阅读器将读取“跳过导航”。然后,用户可以“单击”它以稍后跳转到该页面。在这种情况下,就在导航之后。A common way to allow screen readers to skip over repeated parts of your website are to include hidden a anchor to a position right after the element you'd like to skip.
For example, on one of our websites, we do this to allow skipping over our navigation bar.
The "Skip Navigation"
a
is selectable by using the keyboard and the screen reader will read "Skip Navigation". The user can then "click" on it to jump later into the page. In this case, right after the navigation.可以用html5吗?如果是这样,它包含一个
Can you use html5? If so it contains a
<footer>
tag.我是屏幕阅读器用户,h1 和 h2 标题效果很好。没有好的方法可以让屏幕阅读器跳过我知道的某些文本,这些文本适用于所有屏幕阅读器和浏览器。假设您的内容如下所示,
屏幕阅读器用户应该能够在第一次听到后发现他们再次点击了页脚。然后,他们可以使用所有现代屏幕阅读器提供的快速导航键跳至下一个标题,从而不再收听页脚。
I'm a screen reader user and the h1 and h2 headings will work well. There's no good way to allow a screen reader to skip certain text that I know of which will work with all screen readers and browsers. Assuming your content is something like the following though
A screen reader user should be able to figure out they hit the footer again after hearing it the first time. They can then use quick navigation keys provided by all modern screen readers to skip to the next heading thus not listening to the footer again.