Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
af81911c
Commit
af81911c
authored
Jan 18, 2009
by
Angie Byron
Browse files
#152098
by mgifford: Improve accessibility of radios and checkboxes.
parent
6135b967
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/form.inc
View file @
af81911c
...
...
@@ -1548,7 +1548,7 @@ function theme_radio($element) {
$output
.
=
(
check_plain
(
$element
[
'#value'
])
==
$element
[
'#return_value'
])
?
' checked="checked" '
:
' '
;
$output
.
=
drupal_attributes
(
$element
[
'#attributes'
])
.
' />'
;
if
(
!
is_null
(
$element
[
'#title'
]))
{
$output
=
'<label class="option">'
.
$output
.
' '
.
$element
[
'#title'
]
.
'</label>'
;
$output
=
'<label class="option"
for="'
.
$element
[
'#id'
]
.
'"
>'
.
$output
.
' '
.
$element
[
'#title'
]
.
'</label>'
;
}
unset
(
$element
[
'#title'
]);
...
...
@@ -1976,7 +1976,7 @@ function theme_checkbox($element) {
$checkbox
.
=
drupal_attributes
(
$element
[
'#attributes'
])
.
' />'
;
if
(
!
is_null
(
$element
[
'#title'
]))
{
$checkbox
=
'<label class="option">'
.
$checkbox
.
' '
.
$element
[
'#title'
]
.
'</label>'
;
$checkbox
=
'<label class="option"
for="'
.
$element
[
'#id'
]
.
'"
>'
.
$checkbox
.
' '
.
$element
[
'#title'
]
.
'</label>'
;
}
unset
(
$element
[
'#title'
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment