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 8b9017891b
commit 5ae23fdb27
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 ?
`${this.props.groupProfile.name} (${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
src={httpUrl}
width="16"
height="16"
onClick={this.onClick}
title={tooltip} />;
title={tooltip}
aria-hidden={true}
/>;
}
}