How can I make an HTML radiobutton with a big target area?

前端 未结 4 756
一向
一向 2021-01-01 16:05

Something like this:

\"enter

Where the user would click on any area of the but

4条回答
  •  [愿得一人]
    2021-01-01 17:10

    Have you tried using the LABEL tag? For accessibility sake we should be using label tags to associate labels to form controls all of the time. Not only does that help tie things together for screen readers, but it also makes the label as well as the control clickable.

    You can read a bit more detail and find an example here: http://webaim.org/techniques/forms/screen_reader#labels

提交回复
热议问题