--- id: 587d778b367417b2b2512aa7 title: Wrap Radio Buttons in a fieldset Element for Better Accessibility localeTitle: Envuelva los botones de radio en un elemento fieldset para una mejor accesibilidad challengeType: 0 videoUrl: '' --- ## Description
El siguiente tema del formulario cubre la accesibilidad de los botones de radio. A cada opción se le asigna una label con un atributo for vincula con el id del elemento correspondiente tal como se describe en el último desafío. Dado que los botones de radio a menudo vienen en un grupo donde el usuario debe elegir uno, hay una manera de mostrar semánticamente que las opciones son parte de un conjunto. La etiqueta de fieldset rodea todo el grupo de botones de radio para lograr esto. A menudo utiliza una etiqueta de legend para proporcionar una descripción de la agrupación, que los lectores de pantalla leen para cada opción en el elemento fieldset . El fieldset y la etiqueta de legend no son necesarios cuando las opciones son autoexplicativas, como una selección de género. Usando una label con el for atributo para cada botón de radio es suficiente. Aquí hay un ejemplo:
<form>
  <fieldset>
    <legend>Choose one of these three items:</legend>
    <input id="one" type="radio" name="items" value="one">
    <label for="one">Choice One</label><br>
    <input id="two" type="radio" name="items" value="two">
    <label for="two">Choice Two</label><br>
    <input id="three" type="radio" name="items" value="three">
    <label for="three">Choice Three</label>
  </fieldset>
</form>
## Instructions
Camper Cat desea información sobre el nivel de ninja de sus usuarios cuando se registran en su lista de correo electrónico. Ha añadido un conjunto de botones de radio, y aprendió de la lección anterior para utilizar etiquetas de la etiqueta con la for atributos para cada elección. ¡Ve el gato campista! Sin embargo, su código todavía necesita ayuda. Cambie la etiqueta div rodea a los botones de fieldset una etiqueta de conjunto de fieldset y cambie la etiqueta p dentro de una legend .
## Tests
```yml tests: - text: El código debe tener un fieldset de etiqueta en todo el juego de botones circulares. testString: 'assert($("fieldset").length == 1, "Your code should have a fieldset tag around the radio button set.");' - text: Asegúrese de que su elemento fieldset tenga una etiqueta de cierre. testString: 'assert(code.match(/<\/fieldset>/g) && code.match(/<\/fieldset>/g).length === code.match(/
/g).length, "Make sure your fieldset element has a closing tag.");' - text: Tu código debe tener una etiqueta de legend alrededor del texto que pregunta qué nivel de ninja es un usuario. testString: 'assert($("legend").length == 1, "Your code should have a legend tag around the text asking what level ninja a user is.");' - text: Su código no debe tener ninguna etiqueta div . testString: 'assert($("div").length == 0, "Your code should not have any div tags.");' - text: Tu código ya no debería tener una etiqueta p alrededor del texto que pregunta qué nivel de ninja es un usuario. testString: 'assert($("p").length == 4, "Your code should no longer have a p tag around the text asking what level ninja a user is.");' ```
## Challenge Seed
```html

Deep Thoughts with Master Camper Cat

Sign up to receive Camper Cat's blog posts by email here!

What level ninja are you?



The Garfield Files: Lasagna as Training Fuel?

The internet is littered with varying opinions on nutritional paradigms, from catnip paleo to hairball cleanses. But let's turn our attention to an often overlooked fitness fuel, and examine the protein-carb-NOM trifecta that is lasagna...

Defeating your Foe: the Red Dot is Ours!

Felines the world over have been waging war on the most persistent of foes. This red nemesis combines both cunning stealth and lightening speed. But chin up, fellow fighters, our time for victory may soon be near...

Is Chuck Norris a Cat Person?

Chuck Norris is widely regarded as the premier martial artist on the planet, and it's a complete coincidence anyone who disagrees with this fact mysteriously disappears soon after. But the real question is, is he a cat person?...

```
## Solution
```js // solution required ```