什么是可标记元素? [英] What is a labelable element?

查看:203
本文介绍了什么是可标记元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读无障碍功能和一个概念,我不能找到正确的信息绊倒我:HTML可标签元素。

I have been reading on accessibility and a concept I cannot find accurate information on stumbled upon me: HTML labelable elements.

我理解,可标签元素背后的概念是一个可以正确由< label> 包装或引用,例如:

I understand that the concept behind a labelable element is one that can be properly wrapped or referenced by a <label>, for example:

<label>
    Enter some data
    <input type="text"/>
</label>

或例如:

<label for="anInputField">
    Enter some data
</label>

<input type="text" id="anInputField"/>

有没有人知道什么是labeable HTML元素,哪些不是?

Does anyone know exactly what labeable HTML elements are and which are not?

Bonus Round!
您可以详细说明为什么 第五条规则 的ARIA使用是否正在进行中?在我自己的网站,我想能够解释未来的变化,但我不知道为什么它不是石头(似乎应该是)。

Bonus Round! Can you elaborate on why the fifth rule of ARIA use is a work in progress? In my own websites, I would like to be able to account for future changes to that, but I don't know why it's not set in stone (seems like it should be).

推荐答案

根据MDN,以下元素是可标记的。

According to MDN, the following elements are labelable.

摘录自内容类别


labelable
可以与元素相关联的元素。包含< button> < input> < keygen> < meter> < output> < progress> ; < select> < textarea>

labelable Elements that can be associated with elements. Contains <button>, <input>, <keygen>, <meter>, <output>, <progress>, <select>, and <textarea>.

这篇关于什么是可标记元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆