This patch is a continuation of #43493: FAPI: Add name/type as CSS class for form elements, which adds classes to form element wrappers. Since the form element wrapper class and ID will be essentially interchangeable (the class has slight advantages), it makes sense to remove the ID attribute entirely, since it will serve no purpose that the class does not.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

Status: Needs review » Needs work

Note that the ID attribute needs to actually be removed from the wrapper div in theme_form_element() also, so this still needs work that can be corrected once #43493: FAPI: Add name/type as CSS class for form elements is done.

sun’s picture

Awesome, subscribing

Dries’s picture

quicksketch’s picture

Status: Needs work » Needs review
FileSize
6.04 KB

Re-rolled with the key lines removed from form.inc. After this patch, "edit-$id-wrapper" IDs are dead. The changes are all really straight-forward, but another set of eyes and searches are in order to make sure I didn't miss any and that I properly updated these.

Status: Needs review » Needs work

The last submitted patch failed testing.

quicksketch’s picture

Status: Needs work » Needs review

This patch is still ready to go.

sun’s picture

Status: Needs review » Reviewed & tested by the community

Testbot confirms.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

c960657’s picture

I think the fix for this issue introduced some regressions - see #550572: CSS+JS regressions related to form-item-[name].

-#edit-type-wrapper, #edit-severity-wrapper {
+.form-item-type-wrapper, .form-item-severity-wrapper {

It seems that these should have been replaced using the following pattern instead, i.e. without the form-item prefix:

-#edit-type-wrapper, #edit-severity-wrapper {
+.type-wrapper, .severity-wrapper {