使复选框和无线电标签可点击

使复选框和无线电标签可点击

本文介绍了使复选框和无线电标签可点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大量(我敢说最多?)网站不会使标签可点击其复选框和无线电输入。它似乎是一个巨大的可用性收益非常小的努力。使用< label> 是否会妨碍开发人员使用此标记,是否存在任何兼容性/功能/可用性问题?

A large number of (dare I say most?) sites do not make the labels clickable for their checkbox and radio inputs. It seems to be a huge usability gain for very little effort. Are there any compatibility/functionality/usability issues with using <label> that would discourage developers from using this tag?

修改:即使StackOverflow似乎有罪,例如,当提出问题时,每天通知任何新答案复选框标签是不可点击的。

Even StackOverflow seems guilty of this, e.g., when asking a question, the Notify daily of any new answers checkbox label is not clickable.

推荐答案

除了懒惰之外没有其他理由。 < label> 对于辅助功能是必不可少的,对于那些对我们的鼠标点击目标不佳的人也很方便)。

No reason other than laziness. <label>s are essential for accessibility, and are also pretty handy for those of us who have poor aim with our mouse clicks :)

这篇关于使复选框和无线电标签可点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 01:29