SearchResults: Add row and header roles

This commit is contained in:
Scott Nonnenberg 2019-09-16 12:18:01 -07:00
parent 1984ffc94c
commit 18d6582466

View file

@ -126,7 +126,11 @@ export class SearchResults extends React.Component<PropsType> {
);
} else if (row.type === 'conversations-header') {
return (
<div className="module-search-results__conversations-header">
<div
className="module-search-results__conversations-header"
role="heading"
aria-level={1}
>
{i18n('conversationsHeader')}
</div>
);
@ -143,7 +147,11 @@ export class SearchResults extends React.Component<PropsType> {
);
} else if (row.type === 'contacts-header') {
return (
<div className="module-search-results__contacts-header">
<div
className="module-search-results__contacts-header"
role="heading"
aria-level={1}
>
{i18n('contactsHeader')}
</div>
);
@ -160,7 +168,11 @@ export class SearchResults extends React.Component<PropsType> {
);
} else if (row.type === 'messages-header') {
return (
<div className="module-search-results__messages-header">
<div
className="module-search-results__messages-header"
role="heading"
aria-level={1}
>
{i18n('messagesHeader')}
</div>
);
@ -192,7 +204,7 @@ export class SearchResults extends React.Component<PropsType> {
const row = items[index];
return (
<div key={key} style={style}>
<div role="row" key={key} style={style}>
<CellMeasurer
cache={this.cellSizeCache}
columnIndex={0}