From 6d3b5631199154d83432f292d95f6dd2ae824f6e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 4 Nov 2019 10:16:16 +0000 Subject: [PATCH] Add comments regarding tab-index=-1 --- src/components/views/messages/DateSeparator.js | 1 + src/components/views/rooms/EventTile.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/components/views/messages/DateSeparator.js b/src/components/views/messages/DateSeparator.js index 88b59d0c26..56faa670b2 100644 --- a/src/components/views/messages/DateSeparator.js +++ b/src/components/views/messages/DateSeparator.js @@ -57,6 +57,7 @@ export default class DateSeparator extends React.Component { render() { // ARIA treats
s as separators, here we abuse them slightly so manually treat this entire thing as one + // tab-index=-1 to allow it to be focusable but do not add tab stop for it, primarily for screen readers return


{ this.getLabel() }
diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index bc502d0674..9497324f5a 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -787,6 +787,7 @@ module.exports = createReactClass({ this.props.permalinkCreator, 'replyThread', ); + // tab-index=-1 to allow it to be focusable but do not add tab stop for it, primarily for screen readers return (