Skip to content

Commit e528aae

Browse files
committed
fix(radiosfield): accessibility from keyboard
1 parent 1afc675 commit e528aae

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

css/styles.scss

+8-8
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ form#plugin_formcreator_form {
476476
}
477477

478478
#plugin_formcreator_form input[type = checkbox]:focus + label,
479-
#plugin_formcreator_form input[type = radio].new_radio:focus + label,
479+
#plugin_formcreator_form input[type = radio].form-check-input:focus + label,
480480
#plugin_formcreator_form input[type = file]:focus {
481481
color: #66afe9;
482482
color: rgba(102,175,233, 1);
@@ -517,31 +517,31 @@ form#plugin_formcreator_form {
517517
.radios .form-group-radio + label {
518518
margin-left: 7px;
519519
}
520-
input[type = radio].new_radio {
520+
input[type = radio].form-check-input {
521521
display: none;
522522
}
523523
.label-radio .radio {
524524
padding: 2px 0;
525525
}
526-
input[type = radio].new_radio + label.label-radio span {
526+
input[type = radio].form-check-input + label.label-radio span {
527527
display: inline-block;
528528
position: absolute;
529529
width: 16px;
530530
height: 16px;
531531
}
532-
input[type = radio].new_radio + label.label-radio .box {
532+
input[type = radio].form-check-input + label.label-radio .box {
533533
background-color: #fff;
534534
border: 2px solid #727272;
535535
border-radius: 50%;
536536
}
537-
input[type = radio].new_radio + label.label-radio .check {
537+
input[type = radio].form-check-input + label.label-radio .check {
538538
left: 4px;
539539
top: 4px;
540540
width: 0px;
541541
height: 0px;
542542
opacity: 0;
543543
}
544-
input[type = radio].new_radio:checked + label.label-radio .check {
544+
input[type = radio].form-check-input:checked + label.label-radio .check {
545545
border: 6px solid #727272;
546546
border-radius: 50%;
547547
transition: opacity 0.3s ease;
@@ -1191,7 +1191,7 @@ a.plugin_formcreator_formTile_title {
11911191
opacity: 1;
11921192
color: #3874BC;
11931193

1194-
.radios input[type = radio].new_radio + label:before {
1194+
.radios input[type = radio].form-check-input + label:before {
11951195
background-color: #3874BC;
11961196
border: 2px solid #3874BC;
11971197
}
@@ -1207,7 +1207,7 @@ a.plugin_formcreator_formTile_title {
12071207
margin: 0 20px;
12081208
}
12091209

1210-
.radios input[type = radio].new_radio + label {
1210+
.radios input[type = radio].form-check-input + label {
12111211
display: inline-block;
12121212
margin-right: 10px;
12131213
}

inc/field/radiosfield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function getRenderedHtml($domain, $canEdit = true): string {
122122
$html .= '<span class="form-group-radio">';
123123
$html .= Html::input($fieldName, [
124124
'type' => 'radio',
125-
'class' => 'new_radio form-control',
125+
'class' => 'form-check-input form-control',
126126
'id' => $domId . '_' . $i,
127127
'value' => $value
128128
] + $checked);

0 commit comments

Comments
 (0)