什么时候我们应该使用
超过

发布于 2024-08-24 03:34:01 字数 287 浏览 8 评论 0原文

在什么情况下我们应该使用

而不是

对于屏幕阅读器用户

    重要吗?屏幕阅读器软件是否通知用户内容位于
      中?

In what scenarios we should go for <dl> not <ul>?

Does it matter for screen reader user <ul> or <dl>? does screen reader software notify user about content is in <ul> or <dl>?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

极致的悲 2024-08-31 03:34:01

是定义列表。它应该用在字典这样的情况下:

用例:

<dl>
<dt>Thesaurus</dt>
<dd>A book for finding synonyms of other words, often alphabetical. Similar to a dictionary.</dd>
</dl>

上述结果:

Thesaurus
一本用于查找其他单词同义词的书,通常是按字母顺序排列的。类似于字典。

The idea being that the term-to-be-defined is held in the <dt> element, and the definition of that term is given in the <dd>.

    是一个无序列表。现在,

    并不暗示其内容有任何顺序,但它确实暗示其子项之间的语义关系。然而,

      可以包含任何未排序的内容。

A <dl> is a definition list. It should be used in such a case as, perhaps, a dictionary:

Use-case:

<dl>
<dt>Thesaurus</dt>
<dd>A book for finding synonyms of other words, often alphabetical. Similar to a dictionary.</dd>
</dl>

Result of the above:

Thesaurus
A book for finding synonyms of other words, often alphabetical. Similar to a dictionary.


The idea being that the term-to-be-defined is held in the <dt> element, and the definition of that term is given in the <dd>.

A <ul> is an unordered list. Now, a <dl> does not imply any order to its contents, but it does imply a semantic relation between its children. A <ul>, however, could contain anything that is not ordered.

友欢 2024-08-31 03:34:01

当您使用一组定义而不仅仅是无序项目列表时。

When you're working with a set of definitions and not merely an list of unordered items.

︶ ̄淡然 2024-08-31 03:34:01

对于模棱两可的情况,例如您在乔纳森答案评论中的示例(人名然后描述,问题然后答案),为什么不安装一两个屏幕阅读器的试用版并找出最适合阅读的结构?

(来自此处):

  • 这里有两个 Freedomscientific.com/fs_products/JAWS_HQ.asp" rel="nofollow noreferrer">JAWS
  • 窗户眼睛一个>

For ambiguous cases like your examples in the comment on Jonathan's answer (person name then description, question then answer), why don't you install a trial version of a screen reader or two and find out which construct is read most appropriately?

Here are two (from here):

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文