1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 14:50:29 +00:00

[a11y] my libs: improvements for 'share' & 'delete'

This commit is contained in:
llj
2021-09-22 17:25:48 +08:00
parent d8ba8eb606
commit 7ae256b8b2

View File

@@ -165,11 +165,13 @@ class MylibRepoListItem extends React.Component {
} }
} }
onShareToggle = () => { onShareToggle = (e) => {
e.preventDefault();
this.setState({isShareDialogShow: !this.state.isShareDialogShow}); this.setState({isShareDialogShow: !this.state.isShareDialogShow});
} }
onDeleteToggle = () => { onDeleteToggle = (e) => {
e.preventDefault();
this.setState({isDeleteDialogShow: !this.state.isDeleteDialogShow}); this.setState({isDeleteDialogShow: !this.state.isDeleteDialogShow});
} }
@@ -310,8 +312,8 @@ class MylibRepoListItem extends React.Component {
<td> <td>
{(repo.repo_name && this.state.isOpIconShow) && ( {(repo.repo_name && this.state.isOpIconShow) && (
<div> <div>
<a href="#" className="op-icon sf2-icon-share" title={gettext('Share')} onClick={this.onShareToggle}></a> <a href="#" className="op-icon sf2-icon-share" title={gettext('Share')} role="button" aria-label={gettext('Share')} onClick={this.onShareToggle}></a>
<a href="#" className="op-icon sf2-icon-delete" title={gettext('Delete')} onClick={this.onDeleteToggle}></a> <a href="#" className="op-icon sf2-icon-delete" title={gettext('Delete')} role="button" aria-label={gettext('Delete')} onClick={this.onDeleteToggle}></a>
<MylibRepoMenu <MylibRepoMenu
isPC={true} isPC={true}
repo={this.props.repo} repo={this.props.repo}