Skip to content

Commit 8608268

Browse files
authored
Apply aria-hidden to emoji in SAS verification (#31204)
* Apply aria-hidden to emoji in SAS verification So that for screen readers the canonical emoji description is preferred & we avoid the user being read each emoji twice. Signed-off-by: Michael Telatynski <[email protected]> * Update snapshot Signed-off-by: Michael Telatynski <[email protected]> --------- Signed-off-by: Michael Telatynski <[email protected]>
1 parent f6e85a3 commit 8608268

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/components/views/verification/VerificationShowSas.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ export default class VerificationShowSas extends React.Component<IProps, IState>
107107
if (this.props.sas.emoji) {
108108
const emojiBlocks = this.props.sas.emoji.map((emoji, i) => (
109109
<div className="mx_VerificationShowSas_emojiSas_block" key={i}>
110-
<div className="mx_VerificationShowSas_emojiSas_emoji">{emoji[0]}</div>
110+
<div className="mx_VerificationShowSas_emojiSas_emoji" aria-hidden={true}>
111+
{emoji[0]}
112+
</div>
111113
<div className="mx_VerificationShowSas_emojiSas_label">{tEmoji(emoji, locale)}</div>
112114
</div>
113115
));

test/unit-tests/components/views/dialogs/__snapshots__/VerificationRequestDialog-test.tsx.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ exports[`VerificationRequestDialog When other device accepted emoji, displays em
369369
class="mx_VerificationShowSas_emojiSas_block"
370370
>
371371
<div
372+
aria-hidden="true"
372373
class="mx_VerificationShowSas_emojiSas_emoji"
373374
>
374375
🐶
@@ -383,6 +384,7 @@ exports[`VerificationRequestDialog When other device accepted emoji, displays em
383384
class="mx_VerificationShowSas_emojiSas_block"
384385
>
385386
<div
387+
aria-hidden="true"
386388
class="mx_VerificationShowSas_emojiSas_emoji"
387389
>
388390
🐱

0 commit comments

Comments
 (0)