1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-07 18:03:48 +00:00

[a11y] make 'view profile and more' be accessed by keyboard

This commit is contained in:
llj
2021-09-23 10:28:07 +08:00
parent 7ae256b8b2
commit dd1fd746e8

View File

@@ -67,7 +67,8 @@ class Account extends Component {
});
}
onClickAccount = () => {
onClickAccount = (e) => {
e.preventDefault();
if (this.isFirstMounted) {
seafileAPI.getAccountInfo().then(resp => {
this.setState({
@@ -142,11 +143,11 @@ class Account extends Component {
render() {
return (
<div id="account">
<a id="my-info" onClick={this.onClickAccount} className="account-toggle no-deco d-none d-md-block" aria-label="View profile and more">
<a id="my-info" href="#" onClick={this.onClickAccount} className="account-toggle no-deco d-none d-md-block" aria-label={gettext("View profile and more")}>
<span>{this.renderAvatar()}</span>
<span className="fas fa-caret-down vam"></span>
</a>
<span className="account-toggle sf2-icon-more mobile-icon d-md-none" aria-label="View profile and more" onClick={this.onClickAccount}></span>
<span className="account-toggle sf2-icon-more mobile-icon d-md-none" aria-label={gettext("View profile and more")} onClick={this.onClickAccount}></span>
<div id="user-info-popup" className={`account-popup sf-popover ${this.state.showInfo? '':'hide'}`}>
<div className="outer-caret up-outer-caret">
<div className="inner-caret"></div>