1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

Make ARIA happier with DateSeparator and tidy ELS

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2019-10-21 16:51:40 +01:00
parent fc45a69bb7
commit 8d9dc195d5
2 changed files with 11 additions and 6 deletions

View File

@@ -56,6 +56,11 @@ export default class DateSeparator extends React.Component {
}
render() {
return <h2 className="mx_DateSeparator"><hr /><div>{ this.getLabel() }</div><hr /></h2>;
// ARIA treats <hr/>s as separators, here we abuse them slightly so manually treat this entire thing as one
return <h2 className="mx_DateSeparator" role="separator">
<hr role="none" />
<div>{ this.getLabel() }</div>
<hr role="none" />
</h2>;
}
}