对于此 iOS 联系人(如分隔列表),首选的语义和可访问标记是什么?
此分隔符列表的首选语义和可访问标记是什么?
标记
<ul data-role="listview" data-dividertheme="d" data-inset="true">
<li data-role="list-divider">A</li>
<li><a href="index.html">Adam Kinkaid</a></li>
<li><a href="index.html">Alex Wickerham</a></li>
<li><a href="index.html">Avery Johnson</a></li>
<li data-role="list-divider">B</li>
<li><a href="index.html">Bob Cabot</a></li>
<li data-role="list-divider">C</li>
<li><a href="index.html">Caleb Booth</a></li>
<li><a href="index.html">Christopher Adams</a></li>
</ul>
我在一个项目中使用 jQuery mobile,它使用了我认为用于分隔符的 (A ,B,C...) 应使用 HTML 标题标签。
What would be prefered semantic and accessible markup for this divider list?
I'm using jQuery mobile for a project and it uses this mark-up
<ul data-role="listview" data-dividertheme="d" data-inset="true">
<li data-role="list-divider">A</li>
<li><a href="index.html">Adam Kinkaid</a></li>
<li><a href="index.html">Alex Wickerham</a></li>
<li><a href="index.html">Avery Johnson</a></li>
<li data-role="list-divider">B</li>
<li><a href="index.html">Bob Cabot</a></li>
<li data-role="list-divider">C</li>
<li><a href="index.html">Caleb Booth</a></li>
<li><a href="index.html">Christopher Adams</a></li>
</ul>
I think for dividers (A,B,C...) HTML Heading tags should be used.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
绝对不是
ul
因为它是 aplhabetical,它应该是ol
和list-style-type:upper-alpha;
和嵌套列表。我会使用类似以下的html:
示例:http://jsfiddle.net/easwee/8UUbh/5 /
Definately not
ul
since it is aplhabetical it should be eitherol
withlist-style-type:upper-alpha;
with nested list.I would go with a html something like:
Sample: http://jsfiddle.net/easwee/8UUbh/5/
我会使用定义列表,
我知道标题不是定义标题,但很清楚哪些元素是分隔符以及哪些元素是内容。
编辑 我认为@easwee的解决方案从语义的角度来看要好得多。
I would use a definition list
I know that the titles are not definition titles, but its clear what elements are the dividers and what elements are the contents.
edit i think @easwee's solution is much better in a semantic point of view.