-
-
Notifications
You must be signed in to change notification settings - Fork 831
Make the timeline less noisy for screen readers #3007
Conversation
To have less noise when they run over the sender profile. See element-hq/element-web#9747
This reduces overall noise from the screen reader. It was reading the alt attribute from the sender avatar, which was just a mxid. The read receipts were just nonsensical noise. Fixes element-hq/element-web#2716 Fixes element-hq/element-web#5697 See element-hq/element-web#9747
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.
Looks good overall! 😁
? <MessageTimestamp | ||
showTwelveHour={this.props.isTwelveHour} | ||
ts={this.props.mxEvent.getTs()} | ||
ariaHidden={muteScreenReader} |
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.
Hmm, if it's muted when sending or sending is complete, when will it be read...?
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.
The life of an EventTile is 3 parts, where the third is when things are read out. The first stage is the sending state, which is easy to filter. When the event switches to sent, the tile unmounts and a new one is put in place with a null sending state. That state is replaced shortly after with a property update, which triggers a re-render where the screen reader picks up the text to read (the div is replaced).
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.
Just for my own understanding, what does "that state is replaced shortly after with a property update" mean? Which property updates...?
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.
The mxEvent changes in the component's properties, which leads to an eventSendState change of null->sent
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.
Huh, I thought sent
was first (while waiting for remote echo), then null
was the last and final status...
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.
apparently it's just not my day - you're right. Will open another PR to flip it around.
There's some room for improvement here: we could be making the reader say "You sent a message at 18:46 [body]" or "TravisR sent a message at 18:46 [body]" to make it clearer. Currently it'll read out the sender profile if it is available, and if not just the timestamp + message. This improvement is best left to a future PR though.
Fixes element-hq/element-web#2716
Fixes element-hq/element-web#5697
See element-hq/element-web#9747