<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <title>Form validation example</title>
    <style>
      html {
        font-family: sans-serif;
      }

      form {
        background: #eee;
        border-radius: 20px;
        box-shadow: 1px 1px 1px black;
        padding: 20px;
        width: 330px;
      }

      label {
        width: 160px;
        float: left;
        text-align: right;
        padding: 4px;
        margin-bottom: 20px;
      }

      input {
        width: 130px;
        float: right;
      }

      label, input {
        font-size: 1em;
        line-height: 1.5;
      }

      input[type="checkbox"] {
        height: 24px;
      }

      div {
        clear: both;
      }

      .errors {
        background: yellow;
        border-radius: 20px;
        box-shadow: 1px 1px 1px black;
        padding: 20px;
        width: 300px;
        position: absolute;
        left: 390px;
      }

      .hidden-alert {
        position: absolute;
        left: -100%;
      }
    </style>
  </head>
  <body>
    <h1>Form validation example</h1>
    <div class="errors" role="alert" aria-relevant="all">
      <ul>

      </ul>

    </div>

    <p>Fields marked with an asterisk (*) are required.</p>

    <form>
      <div>
        <label for="name">Enter your name*:</label>
        <input type="text" name="name" id="name" aria-required="true">
      </div>
      <div>
        <label for="age">Enter your age*:</label>
        <input type="number" name="age" id="age" placeholder="Enter 1 to 150" aria-required="true">
      </div>
      <div>
        <label for="musician">Musician:</label>
        <input type="checkbox" name="musician" id="musician">
      </div>
      <div>
        <label for="instruments">Instruments played*:</label>
        <input type="text" name="instruments" id="instruments" aria-required="true">
      </div>
      <div>
        <input type="submit">
      </div>
      <div></div>
    </form>
    <p class="hidden-alert" aria-live="assertive"></p>
    <script src="validation-checkbox-disabled.js"></script>
  </body>
</html>
