aria-required属性学习笔记

简介: 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.


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


目录
相关文章
|
3月前
|
前端开发
|
4月前
使用Form报错提示If ngModel is used within a form tag, either the name attribute must be set or the form
使用Form报错提示If ngModel is used within a form tag, either the name attribute must be set or the form
|
5月前
Missing required prop: “modelValue“
Missing required prop: “modelValue“
|
10月前
disabled与readonly的区别
disabled与readonly的区别
26 0
Required Remainder
Required Remainder
59 0
Required Remainder
|
JavaScript
使用 jQuery 查询属性不包含 disabled 的 input radio
使用 jQuery 查询属性不包含 disabled 的 input radio
使用 jQuery 查询属性不包含 disabled 的 input radio
input[type="radio"]自定义样式
input为radio时,虽然会有默认选中的样式,但是并不符合大多数项目的需求,我们的目标是可以随心所欲自定义它的样式。怎么做呢?其实很简单,只要抓住3点。分别是1.label 2.隐藏自带样式 3.绘制我们的样式。
1141 0

热门文章

最新文章