--- id: 587d778b367417b2b2512aa7 title: Wrap Radio Buttons in a fieldset Element for Better Accessibility challengeType: 0 videoUrl: '' localeTitle: Enrole os botões de rádio em um elemento fieldset para uma melhor acessibilidade --- ## Description
O próximo tópico do formulário aborda a acessibilidade dos botões de opção. Cada escolha é dada uma label com um for atributo amarrar ao id do item correspondente, abrangidos no último desafio. Como os botões de rádio geralmente vêm em um grupo onde o usuário deve escolher um, há uma maneira de mostrar semanticamente que as opções fazem parte de um conjunto. A tag fieldset envolve todo o agrupamento de botões de rádio para conseguir isso. Ele geralmente usa uma legend para fornecer uma descrição para o agrupamento, que é lido pelos leitores de tela para cada opção no elemento fieldset . O wrapper fieldset e a tag legend não são necessários quando as opções são auto-explicativas, como uma seleção de gênero. Usando um label com a for atributo para cada botão de rádio é suficiente. Aqui está um exemplo:
<form>
<fieldset>
<legend> Escolha um destes três itens: </ legend>
<input id = "one" type = "rádio" nome = "itens" valor = "um">
<label for = "one"> Choice One </ label> <br>
<input id = "two" type = "rádio" name = "itens" valor = "dois">
<label for = "two"> Escolha dois </ label> <br>
<input id = "three" type = "rádio" name = "itens" valor = "três">
<label for = "three"> Escolha Três </ label>
</ fieldset>
</ form>
## Instructions
O Camper Cat quer informações sobre o nível ninja de seus usuários quando eles se inscrevem em sua lista de e-mail. Ele é adicionado um conjunto de botões de rádio, e aprendemos de nossa última lição usar tags de etiquetas com for atributos para cada escolha. Vai o gato do campista! No entanto, seu código ainda precisa de ajuda. Altere a tag div redor dos botões de opção para uma tag de fieldset e altere a tag p dentro dela para uma legend .
## Tests
```yml tests: - text: Seu código deve ter uma tag de fieldset torno do conjunto de botões de opção. testString: 'assert($("fieldset").length == 1, "Your code should have a fieldset tag around the radio button set.");' - text: Certifique-se de que seu elemento fieldset tenha uma tag de fechamento. 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: Seu código deve ter uma legend ao redor do texto perguntando qual nível ninja é o usuário. testString: 'assert($("legend").length == 1, "Your code should have a legend tag around the text asking what level ninja a user is.");' - text: Seu código não deve ter tags div . testString: 'assert($("div").length == 0, "Your code should not have any div tags.");' - text: Seu código não deve mais ter uma tag p ao redor do texto perguntando qual nível ninja é um usuário. 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 ```