mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-17 15:21:21 +01:00
Make message separator more accessible. (#7056)
This commit is contained in:
parent
98edc467e0
commit
ea54ea89d4
@ -65,9 +65,9 @@ export default class DateSeparator extends React.Component<IProps> {
|
|||||||
render() {
|
render() {
|
||||||
// ARIA treats <hr/>s as separators, here we abuse them slightly so manually treat this entire thing as one
|
// 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
|
// 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}>
|
return <h2 className="mx_DateSeparator" role="separator" tabIndex={-1} aria-label={this.getLabel()}>
|
||||||
<hr role="none" />
|
<hr role="none" />
|
||||||
<div>{ this.getLabel() }</div>
|
<div aria-hidden="true">{ this.getLabel() }</div>
|
||||||
<hr role="none" />
|
<hr role="none" />
|
||||||
</h2>;
|
</h2>;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user