aria-required 属性学习笔记

网址:https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-required_attribute

The aria-required attribute is used to indicate that user input is required on an element before a form can be submitted. This attribute can be used with any typical HTML form element; it is not limited to elements that have an ARIA role assigned.

aria-required属性用于表明在一个form被提交之后,form里包含的某个元素需要用户输入。该属性不仅限于具有ARIA role属性赋值的元素,任何form内能够包含的典型element都能够维护该属性。

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

虽然HTML5现在已经支持原生的required属性了,但是对于那些尚无法支持HTML5的user agent来说,aria-required仍然非常有用。

Screen readers should announce the field as required.
Note that this attribute will not automatically change the presentation of the field.

该属性并不会改变元素的视觉外观。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

汪子熙

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值