Ticket #7211 (closed Bug: fixed)

Opened 7 years ago

Last modified 6 years ago

formlib doesn't put labels on radiobuttons/checkboxes

Reported by: frankar Owned by:
Priority: major Milestone: 3.1.5
Component: General Version:
Keywords: Cc:

Description (last modified by limi) (diff)

in /@@markup-controlpanel those input fields haven't a label. It is important for all Screen Readers

<div class="value">
<input class="checkboxType" checked="checked" id="form.allowed_types.0" name="form.allowed_types" value="text/html" type="checkbox">&nbsp;text/html<br><input class="checkboxType" id="form.allowed_types.1" name="form.allowed_types" value="text/plain" type="checkbox">&nbsp;text/plain<br><input class="checkboxType" id="form.allowed_types.2" name="form.allowed_types" value="text/plain-pre" type="checkbox">&nbsp;text/plain-pre<br><input class="checkboxType" id="form.allowed_types.3" name="form.allowed_types" value="text/restructured" type="checkbox">&nbsp;text/restructured<br><input class="checkboxType" id="form.allowed_types.4" name="form.allowed_types" value="text/structured" type="checkbox">&nbsp;text/structured<br><input class="checkboxType" id="form.allowed_types.5" name="form.allowed_types" value="text/x-python" type="checkbox">&nbsp;text/x-python<br><input class="checkboxType" id="form.allowed_types.6" name="form.allowed_types" value="text/x-rst" type="checkbox">&nbsp;text/x-rst<br><input class="checkboxType" id="form.allowed_types.7" name="form.allowed_types" value="text/x-web-intelligent" type="checkbox">&nbsp;text/x-web-intelligent<br><input class="checkboxType" id="form.allowed_types.8" name="form.allowed_types" value="text/x-web-markdown" type="checkbox">&nbsp;text/x-web-markdown<br><input class="checkboxType" id="form.allowed_types.9" name="form.allowed_types" value="text/x-web-textile" type="checkbox">&nbsp;text/x-web-textile

Change History

comment:1 Changed 6 years ago by limi

  • Owner changed from somebody to limi
  • Component changed from Unknown to Usability/Accessibility

comment:2 Changed 6 years ago by limi

  • Description modified (diff)

Making initial report more readable.

comment:3 Changed 6 years ago by limi

  • Owner changed from limi to hannosch
  • Component changed from Usability to Infrastructure

OK, this form is generated by formlib, as far as I can see. All radio buttons and checkboxes (and other form elements, too) should have <label> tags.

Reassigning to Hanno, since I don't know where to change this. I assume it's in checkboxwidget.py and friends in plone.app.form, but I probably shouldn't touch Python code. ;)

comment:4 Changed 6 years ago by limi

(Note for whoever is fixing this, look at the standard AT edit forms to see how this should be done wrt. labels. When you can click the text and the checkbox toggles on and off, it's working. :)

comment:5 Changed 6 years ago by limi

  • Summary changed from field without label to formlib doesn't put labels on radiobuttons/checkboxes

Also, as noted in #7213, we might have to use <legend> tags here, since JAWS doesn't read empty labels (which is essentially what you get when there are checkboxes and radiobuttons in a form.

comment:6 Changed 6 years ago by hannosch

  • Owner hannosch deleted

comment:7 Changed 6 years ago by csenger

  • Status changed from new to closed
  • Resolution set to fixed

(In [22097]) Use the MultiCheckBoxWidget from plone.app.form that uses <label>s to be accessible. This closes #7211

comment:8 Changed 22 months ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.