This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 830
Accessibility: Improve Voiceover #12189
Closed
Closed
Changes from 5 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e30354b
Override aria-label for whole tile
akirk 4bf8d18
Change aria-label to aria-labelledby, make listitem tab-able, overrid…
akirk e10941c
Explain the dot
akirk 9ada3c9
Fix types
akirk 18fa2d9
lint
akirk 96772fb
Merge branch 'develop' into improve-message-voiceover
MidhunSureshR 637afa8
Render a hidden colon
MidhunSureshR bb308eb
Update snapshots
MidhunSureshR 04167a6
Merge branch 'develop' into improve-message-voiceover
MidhunSureshR 86abe89
Lint
MidhunSureshR d7f0f04
Update snapshots (again)
MidhunSureshR a9faecf
use prop to decide what aria-label to use
MidhunSureshR 86e9e5e
Update snaapshots
MidhunSureshR c4c6805
Implements functions that return id
MidhunSureshR File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -623,6 +623,7 @@ export default class TextualBody extends React.Component<IBodyProps, IState> { | |
} | ||
|
||
let widgets; | ||
const id = "mx_EventTile_content_" + mxEvent.getId(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
if (this.state.links.length && !this.state.widgetHidden && this.props.showUrlPreview) { | ||
widgets = ( | ||
<LinkPreviewGroup | ||
|
@@ -636,7 +637,7 @@ export default class TextualBody extends React.Component<IBodyProps, IState> { | |
|
||
if (isEmote) { | ||
return ( | ||
<div className="mx_MEmoteBody mx_EventTile_content" onClick={this.onBodyLinkClick}> | ||
<div className="mx_MEmoteBody mx_EventTile_content" id={id} onClick={this.onBodyLinkClick}> | ||
* | ||
<span className="mx_MEmoteBody_sender" onClick={this.onEmoteSenderClick}> | ||
{mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender()} | ||
|
@@ -649,14 +650,14 @@ export default class TextualBody extends React.Component<IBodyProps, IState> { | |
} | ||
if (isNotice) { | ||
return ( | ||
<div className="mx_MNoticeBody mx_EventTile_content" onClick={this.onBodyLinkClick}> | ||
<div className="mx_MNoticeBody mx_EventTile_content" id={id} onClick={this.onBodyLinkClick}> | ||
{body} | ||
{widgets} | ||
</div> | ||
); | ||
} | ||
return ( | ||
<div className="mx_MTextBody mx_EventTile_content" onClick={this.onBodyLinkClick}> | ||
<div className="mx_MTextBody mx_EventTile_content" id={id} onClick={this.onBodyLinkClick}> | ||
{body} | ||
{widgets} | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment doesn't make much sense, and points out that not all consumers of MemberAvatar may have any appended message so maybe another solution is desired which is more respective of the plethora of places a MemberAvatar may be used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried something in 90ea6c4
Basically the aria-label for the component itself is just the name (without dot).
In EventTile, we override the accessible name of the DIV that contains the avatar to be name + dot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That won't work because giving a div both a role and a negative tab index would be yet another accessibility violation. I've added a prop to conditionally add the
.
to the aria label.I'm not entirely convinced that this is really useful. Testing with Orca, I don't really see a difference with/without the dot.