You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-17 17:42:41 +03:00
Merge pull request #3707 from matrix-org/t3chguy/improve_a11y_reactions_row_button
Switch ReactionsRowButton to an AccessibleButton for space/enter handling
This commit is contained in:
@@ -126,10 +126,9 @@ export default class ReactionsRowButton extends React.PureComponent {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return <span className={classes}
|
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||||
role="button"
|
return <AccessibleButton className={classes}
|
||||||
aria-label={label}
|
aria-label={label}
|
||||||
tabindex="0"
|
|
||||||
onClick={this.onClick}
|
onClick={this.onClick}
|
||||||
onMouseOver={this.onMouseOver}
|
onMouseOver={this.onMouseOver}
|
||||||
onMouseOut={this.onMouseOut}
|
onMouseOut={this.onMouseOut}
|
||||||
@@ -141,6 +140,6 @@ export default class ReactionsRowButton extends React.PureComponent {
|
|||||||
{count}
|
{count}
|
||||||
</span>
|
</span>
|
||||||
{tooltip}
|
{tooltip}
|
||||||
</span>;
|
</AccessibleButton>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user