1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-06 17:33:18 +00:00

[a11y] added support for 'keyboard access' to 'share admin libraries/folders/links' & 'select editor'

This commit is contained in:
llj
2021-09-24 17:11:14 +08:00
parent aeae8d3bfd
commit 00d8b28c33
5 changed files with 15 additions and 12 deletions

View File

@@ -123,15 +123,15 @@ class Item extends Component {
const objUrl = `${repoUrl}${Utils.encodePath(item.path)}`;
const desktopItem = (
<tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>
<tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut} onFocus={this.handleMouseOver}>
<td><img src={iconUrl} alt="" width="24" /></td>
<td><Link to={objUrl}>{item.obj_name}</Link></td>
<td><Link to={repoUrl}>{item.repo_name}</Link></td>
<td>{item.view_cnt}</td>
<td>{this.renderExpiration()}</td>
<td>
{!item.is_expired && <a href="#" className={`sf2-icon-link action-icon ${isOpIconShown ? '' : 'invisible'}`} title={gettext('View')} onClick={this.viewLink}></a>}
<a href="#" className={`sf2-icon-delete action-icon ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Remove')} onClick={this.removeLink}></a>
{!item.is_expired && <a href="#" className={`sf2-icon-link action-icon ${isOpIconShown ? '' : 'invisible'}`} title={gettext('View')} aria-label={gettext('View')} role="button" onClick={this.viewLink}></a>}
<a href="#" className={`sf2-icon-delete action-icon ${isOpIconShown ? '' : 'invisible'}`} title={gettext('Remove')} aria-label={gettext('Remove')} role="button" onClick={this.removeLink}></a>
</td>
</tr>
);