fix(seed): Best practice for radio button (#16349)

pull/18182/head
darthm3gatron 2017-12-29 10:57:38 -08:00 committed by mrugesh mohapatra
parent 2df89dab95
commit 9dc3073003
1 changed files with 2 additions and 1 deletions

View File

@ -1769,7 +1769,8 @@
"Each of your radio buttons should be nested within its own <code>label</code> element.", "Each of your radio buttons should be nested within its own <code>label</code> element.",
"All related radio buttons should have the same <code>name</code> attribute.", "All related radio buttons should have the same <code>name</code> attribute.",
"Here's an example of a radio button:", "Here's an example of a radio button:",
"<code>&#60;label&#62;&#60;input type=\"radio\" name=\"indoor-outdoor\"&#62; Indoor&#60;/label&#62;</code>", "<blockquote>&#60;label for=\"indoor\"&#62; <br> &#60;input type=\"radio\" name=\"indoor-outdoor\"&#62;Indoor <br>&#60;/label&#62;</blockquote>",
"It is considered best practice to set the <code>for</code> attribute for assistive technologies to be able to link the relationship between the label and the child elements such as an <code>input</code> in this case.",
"<hr>", "<hr>",
"Add a pair of radio buttons to your form. One should have the option of <code>indoor</code> and the other should have the option of <code>outdoor</code>. Both should share the <code>name</code> attribute of <code>indoor-outdoor</code>." "Add a pair of radio buttons to your form. One should have the option of <code>indoor</code> and the other should have the option of <code>outdoor</code>. Both should share the <code>name</code> attribute of <code>indoor-outdoor</code>."
], ],