Accessibility form fieldset

In this example below you will see how to do a Accessibility form fieldset with some HTML / CSS and Javascript

This awesome code was written by ingosr, you can see more from this user in the personal repository.
You can find the original code on
Copyright ingosr ©
  • HTML
<!DOCTYPE html>
<html lang="en" >

  <meta charset="UTF-8">
  <title>Accessibility form fieldset</title>


    <legend>T-Shirt size</legend>
    <input type="radio" id="s" name="shirtsize" />
    <label for="s,">S</label>  
    <input type="radio" id="m" name="shirtsize" />
    <label for="m,">M</label>  
    <input type="radio" id="l" name="shirtsize" />
    <label for="l,">L</label>