Skip to content

Commit 2c2645c

Browse files
guanpuyouluna
authored andcommitted
feat(Switch): switch a11y
1 parent 86f83c6 commit 2c2645c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/switch/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class Switch extends React.Component {
146146
}
147147

148148
return (
149-
<div {...others} className={classes} {...attrs} aria-checked={this.state.checked}>
149+
<div role="switch" tabIndex="0" {...others} className={classes} {...attrs} aria-checked={this.state.checked}>
150150
<div className={`${this.props.prefix}switch-children`}>{children}</div>
151151
</div>
152152
);

0 commit comments

Comments
 (0)