gpt4 book ai didi

html - 伪元素中的 "searchable, selectable, and available"是否不一致?

转载 作者:行者123 更新时间:2023-12-05 01:08:24 25 4
gpt4 key购买 nike

我正在搜索::before/::after 伪元素并找到了这个 description ...

1.1. Accessibility of Generated Content

Generated content should be searchable, selectable, and available to assistive technologies. The content property applies to speech and generated content must be rendered for speech output. [CSS3-SPEECH]

在另一个place ...

Since they are not restricted to fitting into the document tree, they can be used to select and style portions of the document that do not necessarily map to the document’s tree structure.

and

Like pseudo-classes pseudo-elements do not appear in or modify the document source or document tree. Accordingly, they also do not affect the interpretation of structural pseudo-classes or other selectors pertaining to their originating element or its tree.

确保未映射到文档且不存在的内容“可搜索、可选择和可用”是否一致?如果它不在文档树中,则它不应该是可选的。

如果该内容已经在 CSSWG 中讨论过(或总结过),请告诉我该主题讨论的位置,以及如何实现与当前规范一致的“可搜索、可选择和可用”。

或者,如果您有更好的讨论这个问题的地方,请发表评论。

最佳答案

@Alohci 的 comments ...

There's a difference between the current state of the art, and what is possible. "Searchable and selectable" are probably limited to the document tree at the current time, but there's no fundamental reason why that needs to be the case. That's kind of the point of the phrase that you quote at the start of your question - that those actions need to be moved to be actions on the render tree instead. But that's a big change and hasn't happened yet.

On the other hand, it's not that radical. for instance you can't select or search parts of the document tree that are display:none, so browsers already take some account of the render tree.

如果您有答案,请另外发布以供将来引用。

关于html - 伪元素中的 "searchable, selectable, and available"是否不一致?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60012684/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com