You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Make reaction buttons more accessible
Fixes vector-im/riot-web/issues/11608. This patch: 1. Turns the container of reaction buttons into a toolbar. 2. Makes each button span into a button with a tabindex and an aria-label. 3. Constructs an alternative label that differs slightly from the text displayed by the tool tip: * It uses the names of the people who reacted. * It puts a space before the "reacted with" text. * It uses the actual emoji characters, not the converted colon-delimited shortNames, because the emojis usually tell blind users more about the expression. * It omits the number of reactions, since that information is already conveyed by the names. Signed-off-by: Marco Zehe <marcozehe@mailbox.org>
This commit is contained in:
@@ -149,7 +149,11 @@ export default class ReactionsRow extends React.PureComponent {
|
||||
</a>;
|
||||
}
|
||||
|
||||
return <div className="mx_ReactionsRow">
|
||||
return <div
|
||||
className="mx_ReactionsRow"
|
||||
role="toolbar"
|
||||
aria-label={_t("Reactions")}
|
||||
>
|
||||
{items}
|
||||
{showAllButton}
|
||||
</div>;
|
||||
|
||||
Reference in New Issue
Block a user