mirror of
https://github.com/wassname/talk.git
synced 2026-09-11 12:51:33 +08:00
Adding tabIndex to clickable buttons
This commit is contained in:
@@ -64,11 +64,11 @@ class Dropdown extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<ClickOutside onClickOutside={this.hideMenu}>
|
||||
<div className={styles.dropdown} onClick={this.handleClick} onKeyDown={this.handleKeyDown} role="button" aria-label="Dropdown" aria-haspopup="true" tabIndex="1">
|
||||
<div className={styles.dropdown} onClick={this.handleClick} onKeyDown={this.handleKeyDown} role="button" aria-label="Dropdown" aria-haspopup="true" tabIndex="0">
|
||||
{this.props.icon && <Icon name={this.props.icon} className={styles.icon} />}
|
||||
<span className={styles.label}>{this.renderLabel()}</span>
|
||||
{this.state.isOpen ? <Icon name="keyboard_arrow_up" className={styles.arrow} /> : <Icon name="keyboard_arrow_down" className={styles.arrow} />}
|
||||
<ul className={cn(styles.list, {[styles.listActive] : this.state.isOpen})} role="menubar" aria-hidden="true" tabIndex="2">
|
||||
<ul className={cn(styles.list, {[styles.listActive] : this.state.isOpen})} role="menubar" aria-hidden="true">
|
||||
{React.Children.toArray(this.props.children)
|
||||
.map((child) =>
|
||||
React.cloneElement(child, {
|
||||
|
||||
Reference in New Issue
Block a user