<input>
with error message wrapped inside <label>
← Return to main list
This is a test case designed to determine how an error message, associated with an <input>
is announced by various screen readers.
In this case, the <label>
is wrapped around the content, form control and help information. For this reason, the error message is part of the label content and should be announced as part of the accessible name.
Example
Code
<div class="form-group">
<label for="name">
<span class="label">Name</span>
<input class="input" type="text" id="name">
<span class="error-message">Error: Make sure to include full name</span>
</label>
</div>
Assistive technologies
VoiceOver
- Chrome: Name. Error: Make sure to include full name. Edit text.
- Firefox: Name. Error: Make sure to include full name. Edit text.
- Safari: Name. And one more item. Edit text. [Additional content not announced]
NVDA
- Chrome: Name. Error: Make sure to include full name. Edit. Blank.
- Firefox: Name. Has autocomplete. Error: Make sure to include full name. Edit. Blank.
- Edge: Name. Error: Make sure to include full name. Edit. Blank.
JAWS
- Chrome: Name. Error. Colon. Make sure to include full name. Edit. Type in text.
- Firefox: Name. Error. Colon. Make sure to include full name. Edit. Type in text.
- Edge: Name. Error. Colon. Make sure to include full name. Edit. Type in text.
← Return to main list