📜  required vs aria-required - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:53.657000             🧑  作者: Mango

代码示例1
You will be happy to know that both NVDA and JAWS announce the field as required.

In short, you do not need aria-required any longer. Just use required.
You can read a bit more about the ARIA attributes you can dump in this article by Steve Faulkner (one of the editors of the ARIA spec) from 2015: http://html5doctor.com/on-html-belts-and-aria-braces/

HTML5 now has the required attribute, but aria-required is still useful for user agents that do not yet support HTML5.