Hide flair from screen readers

To have less noise when they run over the sender profile.

See https://github.com/vector-im/riot-web/issues/9747
pull/21833/head
Travis Ralston 2019-05-21 18:52:27 -06:00
parent 8844706e5f
commit 85a024175b
1 changed files with 7 additions and 1 deletions

View File

@ -45,12 +45,18 @@ class FlairAvatar extends React.Component {
const tooltip = this.props.groupProfile.name ? const tooltip = this.props.groupProfile.name ?
`${this.props.groupProfile.name} (${this.props.groupProfile.groupId})`: `${this.props.groupProfile.name} (${this.props.groupProfile.groupId})`:
this.props.groupProfile.groupId; this.props.groupProfile.groupId;
// Note: we hide flair from screen readers but ideally we'd support
// reading something out on hover. There's no easy way to do this though,
// so instead we just hide it completely.
return <img return <img
src={httpUrl} src={httpUrl}
width="16" width="16"
height="16" height="16"
onClick={this.onClick} onClick={this.onClick}
title={tooltip} />; title={tooltip}
aria-hidden={true}
/>;
} }
} }