有人可以解释 HTML5 aria-* 属性吗?
我想知道 aria-* 属性的用途。他们可以拥有哪些价值观?它们是定义的价值观还是我可以创造自己的价值观?
I wanted to know what the aria-*
attributes are used for. What values can they have, and are they defined values or can I create my own values?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ARIA 代表可访问的富互联网应用程序,旨在提高富互联网的可访问性应用程序,即使它们更适合残疾人士使用。
有关各种属性的帮助可在此处获取。
我认为您无法创建自己的 ARIA 属性。
ARIA stands for Accessible Rich Internet Applications and is designed to improve the accessibility of Rich Internet Applications, i.e. to make them more usable for people with disabilities.
Help on the various attributes is available here.
I don't think you can create your own ARIA attributes.
aria-* 属性是 WAI-ARIA 规范的一部分,它有助于使依赖屏幕阅读器等辅助技术的用户更容易访问 Web 应用程序。这些属性定义元素的角色、状态和属性,以改进辅助工具对它们的解释方式。此外,您将无法创建自己的 aria 属性
例如:
可见文字。
来自屏幕阅读器。
当前已展开或折叠。
这些属性对于创建可访问的动态 Web 内容至关重要,并且在本机 HTML5 语义达不到要求时尤其有用。精心使用 ARIA 可以极大地增强残障人士的用户体验。
更多详情,您可以参考
https://www.w3.org/WAI/standards-guidelines/aria/< /a>
https://developer.mozilla.org/en-US /docs/Web/Accessibility/ARIA
https://webaim.org/techniques/aria/< /a>
如果您想进一步了解特定 aria-* 属性或如何实现它们,请告诉我!
The aria-* attributes are part of the WAI-ARIA specification, which helps make web applications more accessible for users relying on assistive technologies like screen readers. These attributes define the roles, states, and properties of elements to improve how they are interpreted by assistive tools. Also you will not able to create your own aria attributes
For example:
visible text.
from screen readers.
currently expanded or collapsed.
These attributes are essential for creating accessible, dynamic web content and are especially useful when native HTML5 semantics fall short. Using ARIA thoughtfully can greatly enhance the user experience for those with disabilities.
For more details, you can refer to
https://www.w3.org/WAI/standards-guidelines/aria/
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA
https://webaim.org/techniques/aria/
Let me know if you'd like further clarification on specific aria-* attributes or how to implement them!