Location: 06 Discussion - Add Post
Description: The "follow this post" and "post anonymously" checkboxes are not properly labeled. Implicit labeling is used by putting the checkbox and the on-screen label in a label element. However, the label does not have a for attribute that corresponds to the ID of the input field. The checkbox is rendered without a label with JAWS 18 in IE11.
Auditor Note: Developers must add a for attribute in the label element which equals to the ID of the input checkbox field that it labels. This will explicitly associate the label to the checkbox.
<label for="follow" class="field-label label-inline">
<input id="follow" name="follow" class="field-input input-checkbox" checked="" type="checkbox">
<span class="icon fa fa-star" aria-hidden="true"></span>follow this post
Internal Note: I initially considered this a bug with JAWS and IE since all other screen reader/browser combos have handled implicit labels on checkboxes forever. However, this condition is warned against in old accessibility specifications, so we must fix it.
The trickiest part of this is coming up with a unique id for the input element. This is called "explicit labeling".
Assuming that I should add in the id/for attributes directly to the checkboxes/labels here: https://github.com/edx/edx-platform/blob/master/common/static/common/templates/discussion/new-post.underscore#L59
how explicit do these need to be - i.e "follow" like the example from above, or more specific with "follow this post"? Or something else entirely
After looking at WAI tutorials for labeling controls, I named the for/id the same as the "name" attribute that already existed. Tested locally with VoiceOver - need to sync up with to test on JAWS/IE.
This was rolled to Prod on 11/22