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

Commit

Permalink
Add comments regarding tab-index=-1
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Nov 4, 2019
1 parent fd4cdd0 commit 6d3b563
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/views/messages/DateSeparator.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default class DateSeparator extends React.Component {

render() {
// ARIA treats <hr/>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 <h2 className="mx_DateSeparator" role="separator" tabIndex={-1}>
<hr role="none" />
<div>{ this.getLabel() }</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/views/rooms/EventTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className={classes} tabIndex={-1}>
<div className="mx_EventTile_msgOption">
Expand Down

0 comments on commit 6d3b563

Please sign in to comment.