<labelclass="label"for="text">Enter your text below.</label> <textareaclass="textarea"id="text"></textarea>
<paria-live="polite">You've written <strong><spanid="word-count">0</span> words</strong> and <strong><spanid="character-count">0</span> characters</strong>.</p>
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/* Changes to the content in #word-count and #character-count should be announced to screen reader users. Test this with an actual screen reader to hear how the announcements are actually made. */