1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 16:31:13 +00:00

[a11y] dir view - file tag: improvements & added support for 'keyboard access'

This commit is contained in:
llj
2021-09-27 14:44:38 +08:00
parent 8fa1c01d11
commit 95a810858a
4 changed files with 20 additions and 12 deletions

View File

@@ -69,9 +69,9 @@ class RepoInfoBar extends React.Component {
<li key={usedRepoTag.id} className="used-tag-item">
<span className="used-tag" style={{backgroundColor:usedRepoTag.color}}></span>
<span className="used-tag-name" title={usedRepoTag.name}>{usedRepoTag.name}</span>
<span className="used-tag-files" onClick={this.onListTaggedFiles.bind(this, usedRepoTag)}>
<button type="button" className="used-tag-files border-0 bg-transparent" onClick={this.onListTaggedFiles.bind(this, usedRepoTag)}>
{usedRepoTag.fileCount > 1 ? usedRepoTag.fileCount + ' files' : usedRepoTag.fileCount + ' file'}
</span>
</button>
</li>
);
})}
@@ -94,9 +94,9 @@ class RepoInfoBar extends React.Component {
<span className="file-info">
<span className="info-icon sf2-icon-drafts"></span>
<span className="used-tag-name">{gettext('draft')}</span>
<span className="used-tag-files" onClick={this.toggleDrafts}>
<button type="button" className="used-tag-files border-0 bg-transparent" onClick={this.toggleDrafts}>
{this.props.draftCounts > 1 ? this.props.draftCounts + ' files' : this.props.draftCounts + ' file'}
</span>
</button>
</span>
}
</div>