Adds role=article to all messages

Co-authored-by: Jamie Kyle <113370520+jamiebuilds-signal@users.noreply.github.com>
This commit is contained in:
Josh Perez 2023-04-24 15:00:54 -04:00 committed by GitHub
parent 5f522c605d
commit 781531d8d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -5034,6 +5034,10 @@
"messageformat": "Cancel",
"description": "Appears on the cancel button in confirmation dialogs."
},
"icu:Message__role-description": {
"messageformat": "Message",
"description": "aria-roledescription of a message"
},
"MessageBody--read-more": {
"message": "Read more",
"description": "(deleted 03/29/2023) When a message is too long this is the affordance to expand the message"

View file

@ -2488,6 +2488,7 @@ export class Message extends React.PureComponent<Props, State> {
deletedForEveryone,
direction,
giftBadge,
id,
isSticker,
isTapToView,
isTapToViewExpired,
@ -2553,6 +2554,7 @@ export class Message extends React.PureComponent<Props, State> {
<div className="module-message__container-outer">
<div
className={containerClassnames}
id={`message-accessibility-contents:${id}`}
style={containerStyles}
onContextMenu={onContextMenu}
role="row"
@ -2598,6 +2600,7 @@ export class Message extends React.PureComponent<Props, State> {
id,
attachments,
direction,
i18n,
isSticker,
isSelected,
isSelectMode,
@ -2681,11 +2684,14 @@ export class Message extends React.PureComponent<Props, State> {
return (
<div
aria-labelledby={`message-accessibility-contents:${id}`}
aria-roledescription={i18n('icu:Message__role-description')}
className={classNames(
'module-message__wrapper',
isSelectMode && 'module-message__wrapper--select-mode',
isSelected && 'module-message__wrapper--selected'
)}
role="article"
{...wrapperProps}
>
{isSelectMode && (