Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Update to use more strict rules for suppressing
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Zehe <marco@marcozehe.de>
  • Loading branch information
MarcoZehe committed Jul 15, 2020
1 parent d837357 commit 636b023
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/components/views/rooms/EventTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,7 @@ export default createReactClass({
});

// If the tile is in the Sending state, don't speak the message.
const ariaLive = (isSending) ? "off" : undefined;
const ariaBusy = (isSending) ? "true" : undefined;
const ariaLive = (this.props.eventSendStatus !== null) ? 'off' : undefined;

let permalink = "#";
if (this.props.permalinkCreator) {
Expand Down Expand Up @@ -823,7 +822,7 @@ export default createReactClass({
case 'notif': {
const room = this.context.getRoom(this.props.mxEvent.getRoomId());
return (
<div className={classes} aria-live={ariaLive} aria-busy={ariaBusy}>
<div className={classes} aria-live={ariaLive}>
<div className="mx_EventTile_roomName">
<a href={permalink} onClick={this.onPermalinkClicked}>
{ room ? room.name : '' }
Expand All @@ -849,7 +848,7 @@ export default createReactClass({
}
case 'file_grid': {
return (
<div className={classes} aria-live={ariaLive} aria-busy={ariaBusy}>
<div className={classes} aria-live={ariaLive}>
<div className="mx_EventTile_line">
<EventTileType ref={this._tile}
mxEvent={this.props.mxEvent}
Expand Down Expand Up @@ -885,7 +884,7 @@ export default createReactClass({
);
}
return (
<div className={classes} aria-live={ariaLive} aria-busy={ariaBusy}>
<div className={classes} aria-live={ariaLive}>
{ ircTimestamp }
{ avatar }
{ sender }
Expand Down Expand Up @@ -915,7 +914,7 @@ export default createReactClass({

// tab-index=-1 to allow it to be focusable but do not add tab stop for it, primarily for screen readers
return (
<div className={classes} tabIndex={-1} aria-live={ariaLive} aria-busy={ariaBusy}>
<div className={classes} tabIndex={-1} aria-live={ariaLive}>
{ ircTimestamp }
<div className="mx_EventTile_msgOption">
{ readAvatars }
Expand Down

0 comments on commit 636b023

Please sign in to comment.