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

Exclude message timestamps from aria live region #10584

Merged
merged 4 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/views/messages/MessageTimestamp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface IProps {
export default class MessageTimestamp extends React.Component<IProps> {
public render(): React.ReactNode {
const date = new Date(this.props.ts);
let timestamp;
let timestamp: string;
if (this.props.showRelative) {
timestamp = formatRelativeTime(date, this.props.showTwelveHour);
} else if (this.props.showFullDate) {
Expand All @@ -46,6 +46,7 @@ export default class MessageTimestamp extends React.Component<IProps> {
className="mx_MessageTimestamp"
title={formatFullDate(date, this.props.showTwelveHour)}
aria-hidden={true}
aria-live="off"
>
{timestamp}
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/rooms/EventTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,7 @@ export class UnwrappedEventTile extends React.Component<EventTileProps, IState>

const timestamp = showTimestamp && ts ? messageTimestamp : null;

let reactionsRow;
let reactionsRow: JSX.Element | undefined;
if (!isRedacted) {
reactionsRow = (
<ReactionsRow
Expand Down

Large diffs are not rendered by default.