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
This commit is contained in:
parent
8b9017891b
commit
5ae23fdb27
1 changed files with 7 additions and 1 deletions
|
@ -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}
|
||||||
|
/>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue