无序列表和可访问性 [英] Unordered lists and accessibility

查看:50
本文介绍了无序列表和可访问性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多(大多数?)旨在可访问性和符合标准的站点都使用无序列表进行导航.这是否使网站更易于访问,还是只是提供了有用的样式元素?

Many (most?) sites aiming for accessibility and standards compliance use unordered lists for their navigation. Does this make the site more accessible or does it just provide useful elements for styling?

我不在乎它们,并且我一直在以这种方式使用无序列表.就是这样,当我从页面上删除样式以评估其可访问性时,令我惊讶的是,它也可能是纯链接.这是哪里来的?

I don't mind them, and I have been using unordered lists in this way. It's just that, when I remove the styling from a page to try to gauge it's accessibility, it strikes me that it could just as well could be plain links. Where does this come from?

推荐答案

您网站导航的最佳标记是最能代表您的导航内容的HTML标签.这就是橡胶与HTML语义学相遇的地方.

The best markup for your site's navigation would the HTML tag(s) that best represent what your navigation is. This is where rubber meets the road for HTML semantics.

您的导航列表是否没有逻辑顺序?如果是这样,那么< UL> 将是一个不错的选择.您的导航更多是需要步骤的向导,还是按字母顺序或数字顺序进行?如果是这样,那么< OL> 可能是一个更好的选择.

Is your navigation a list that doesn't have any logical ordering? If so then <UL> would be a good choice. Is your navigation more of a wizard that requires steps or is it perhaps in alphabetical or numerical sequence? If so then <OL> might be a better choice.

您提到的将导航呈现为纯链接并没有提供任何语义上的含义;这表明您的导航是一句话,值得一读.通过在列表中提供链接,可以提示我们如何解释这一系列超文本链接的单词.

Rendering your navigation as plain links as you mention does not provide any semantic meaning; it would suggest that your navigation is a sentence to be read. By providing your links in a list, you supply a hint as to how we are to interpret this series of hypertext-linked words.

这篇关于无序列表和可访问性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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