Radio group with error - aria-labelledby applied to <legend>

Return to main list

This is a test case designed to determine how an error message associated with a radio group will be announced by various screen readers.

Example

Do you like boats?

Error: Choose at least one option

Code

<fieldset>
  <legend aria-describedby="e01">Do you like boats?</legend>
  <div class="form-group">
    <input type="radio" id="boats-y" name="boats">
    <label for="boats-y">Yes</label>
  </div>
  <div class="form-group">
    <input type="radio" id="boats-n" name="boats">
    <label for="boats-n">No</label>
  </div>
  <p class="error-message" id="e01">Error: Choose at least one option</p>
</fieldset>

Assistive technologies

VoiceOver

  • Chrome: Yes. Radio button. 1 of 2. Do you like boats? Group. [Error message not announced]
  • Firefox: Yes. Radio button. 1 of 2. Do you like boats? Group. [Error message not announced]
  • Safari: Yes. Radio button. 1 of 2. Do you like boats? Do you like boats? Group. [Error message not announced]
  • NVDA

    JAWS

    Return to main list