Skip to content

Commit debfbe4

Browse files
committed
replaced inner label tags with span for accessibility
1 parent 89253f3 commit debfbe4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/bootstrap-switch-button-react.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export default class BootstrapSwitchButton extends React.Component {
103103
onClick={this.toggle}
104104
>
105105
<div className="switch-group">
106-
<label
106+
<span
107107
className={
108108
"switch-on btn btn-" +
109109
this.state.onstyle +
@@ -112,8 +112,8 @@ export default class BootstrapSwitchButton extends React.Component {
112112
style={labelStyle}
113113
>
114114
{this.state.onlabel}
115-
</label>
116-
<label
115+
</span>
116+
<span
117117
className={
118118
"switch-off btn btn-" +
119119
this.state.offstyle +
@@ -122,7 +122,7 @@ export default class BootstrapSwitchButton extends React.Component {
122122
style={labelStyle}
123123
>
124124
{this.state.offlabel}
125-
</label>
125+
</span>
126126
<span
127127
className={
128128
"switch-handle btn btn-light" +

0 commit comments

Comments
 (0)