Skip to content

Commit 6d3b563

Browse files
committed
Add comments regarding tab-index=-1
1 parent fd4cdd0 commit 6d3b563

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/components/views/messages/DateSeparator.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export default class DateSeparator extends React.Component {
5757

5858
render() {
5959
// ARIA treats <hr/>s as separators, here we abuse them slightly so manually treat this entire thing as one
60+
// tab-index=-1 to allow it to be focusable but do not add tab stop for it, primarily for screen readers
6061
return <h2 className="mx_DateSeparator" role="separator" tabIndex={-1}>
6162
<hr role="none" />
6263
<div>{ this.getLabel() }</div>

src/components/views/rooms/EventTile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ module.exports = createReactClass({
787787
this.props.permalinkCreator,
788788
'replyThread',
789789
);
790+
// tab-index=-1 to allow it to be focusable but do not add tab stop for it, primarily for screen readers
790791
return (
791792
<div className={classes} tabIndex={-1}>
792793
<div className="mx_EventTile_msgOption">

0 commit comments

Comments
 (0)