Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Remove unnecessary "for" attribute from checkbox labels #45

Closed
wants to merge 1 commit into from

2 participants

Ali Ayas Jakub Vrána
Ali Ayas

If the label tag encapsulates the checkbox, then the "for"
attribute is not necessary.

Please comment if I'm missing something.

Ali Ayas maliayas Remove unnecessary "for" attribute from checkbox labels
If the label tag encapsulates the checkbox, then the "for"
attribute is not necessary.
e63033b
Jakub Vrána
Owner

It's required in IE6.

Jakub Vrána vrana closed this
Ali Ayas

I see. Then the JS side should be changed not to allow duplicate IDs. Btw I assume you already know that this patch is about this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 2, 2013
  1. Ali Ayas

    Remove unnecessary "for" attribute from checkbox labels

    maliayas authored
    If the label tag encapsulates the checkbox, then the "for"
    attribute is not necessary.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  adminer/include/functions.inc.php
2  adminer/include/functions.inc.php
View
@@ -106,7 +106,7 @@ function checkbox($name, $value, $checked, $label = "", $onclick = "", $class =
. ($onclick ? ' onclick="' . h($onclick) . '"' : '')
. " id='checkbox-$id'>"
;
- return ($label != "" || $class ? "<label for='checkbox-$id'" . ($class ? " class='$class'" : "") . ">$return" . h($label) . "</label>" : $return);
+ return ($label != "" || $class ? "<label" . ($class ? " class='$class'" : "") . ">$return" . h($label) . "</label>" : $return);
}
/** Generate list of HTML options
Something went wrong with that request. Please try again.