Accessibility tree - MDN Web Docs Glossary: Definitions of Web-related terms 编辑
The accessibility tree contains accessibility-related information for most HTML elements.
Browsers convert markup into an internal representation called the DOM tree. The DOM tree contains objects representing all the markup’s elements, attributes, and text nodes. Browsers then create an accessibility tree based on the DOM tree, which is used by platform-specific Accessibility APIs to provide a representation that can be understood by assistive technologies, such as screen readers.
There are four things in an accessibility tree object:
- name
- How can we refer to this thing? For instance, a link with the text "Read more" will have "Read more" as its name (find more on how names are computed in the Accessible Name and Description Computation spec).
- description
- How do we describe this thing, if we want to provide more desciption beyond the name? The description of a table could explain what kind of information the table contains.
- role
- What kind of thing is it? For example, is it a button, a nav bar, or a list of items?
- state
- Does it have a state? Examples include checked or unchecked for checkboxes, and collapsed or expanded for the
<summary>
element.
Additionally, the accessibility tree often contains information on what can be done with an element: a link can be followed, a text input can be typed into, etc.
While still in draft form within the Web Incubator Community Group, the Accessibility Object Model (AOM) intends to incubate APIs that make it easier to express accessibility semantics and potentially allow read access to the computed accessibility tree.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论