• I’ve installed the Contact Form 7 Accessibility plugin, and read the How to Set up an Accessible Form blog post, but I am not having success with the checkbox item. I use this code for the checkbox fieldset:

    <fieldset>
    <p><label><strong>I believe my idea will:</strong> (select all that apply)</label><br /><br />
       [checkbox idea-result id:idea-result use_label_element "Prevent Accidents" "Improve Student Success" "Improve Service" "Improve Morale" "Increase Productivity" "Reduce Costs" "Save Time" "Prevent Waste" "Other (Specify):"]
    </fieldset>

    but when I go to verify it I get:
    “Check 206: input element, type of “checkbox”, has no text in label.
    Repair: Add text to the input element’s associated label that describes the purpose or function of the control.
    Error Line 716, Column 165:
    <input type=”checkbox” name=”idea-result[]” value=”Prevent Accidents” />
    Error Line 716, Column 349:
    <input type=”checkbox” name=”idea-result[]” value=”Improve Student Success” />
    Error Line 716, Column 545:
    <input type=”checkbox” name=”idea-result[]” value=”Improve Service” />”
    Would you be able to tell me what I have missed? Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    You’re creating a checkbox group, so you shouldn’t need to add a label element; it won’t do anything. Your existing label element should be <legend>. The ‘use_label_element’ parameter should add a label for each checkbox, however, so those should be labeled using that code.

    I’m using the ‘use_label_element” parameter on my checkboxes and it still does not assign the label to each checkbox.

    screenshot

    • This reply was modified 7 years, 8 months ago by petebocken.
    Plugin Author Joe Dolson

    (@joedolson)

    That’s an implicit label, where the label is associated with the checkbox because it encloses the input instead of using a for/id relationship. It’s not the best possible way to label an element, but it works for almost all assistive technology.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Checkbox accessibility labels’ is closed to new replies.