Ok, I'm looking admin/config/content/formats/2

There are orphaned labels which seem to be produced by FAPI via:

  $form['filters']['order'] = array(
    '#type' => 'item',
    '#title' => t('Filter processing order'),
    '#theme' => 'filter_admin_format_filter_order',
  );

...

  $form['filter_settings_title'] = array(
    '#type' => 'item',
    '#title' => t('Filter settings'),
  );

Which is a problem of semantics but it produces errors for validators like webaim.

It would be much better if produced:

  <h3>Filter processing order </h3>

Rather than:

  <label for="edit-filters-order">Filter processing order </label>

but it doesn't seem right to use theme_form_element_label() to do this.

Comments

mgifford’s picture

For a similar issue see - #882666: Core form descriptions shouldn't use a label when not associated with a form

Having item types producing labels can be pretty easily fixed however. It's bad HTML too:

http://www.w3schools.com/tags/tag_label.asp

mgifford’s picture

Status: Active » Needs review
Issue tags: +Accessibility
StatusFileSize
new731 bytes

This is a pretty pervasive bug as it's all over the admin interface. It's such bad HTML that we really should remove it for the sake of our pride if nothing else.

There's not a strong accessibility case for this change other than general confusion that it might cause, but ya, http://www.w3schools.com/tags/tag_label.asp

Status: Needs review » Needs work

The last submitted patch, remove_labels_for_items_v1.patch, failed testing.

mgifford’s picture

Status: Needs work » Closed (duplicate)

same problem (essentially) and the solution is in the same line of code, so let's treat them all in the same place:

#884846: Orphaned Labels Being Generated for Radios, Checkboxes & Items