Hide separators to screen readers (#164)
This commit is contained in:
parent
9dceb9a093
commit
4e75ee7787
2 changed files with 3 additions and 3 deletions
|
|
@ -203,7 +203,7 @@ class DocSearch {
|
|||
utils.getHighlightedValue(hit, 'lvl4'),
|
||||
utils.getHighlightedValue(hit, 'lvl5'),
|
||||
utils.getHighlightedValue(hit, 'lvl6')
|
||||
]).join('<span class="aa-suggestion-title-separator"> › </span>');
|
||||
]).join('<span class="aa-suggestion-title-separator" aria-hidden="true"> › </span>');
|
||||
const text = utils.getSnippetedValue(hit, 'content');
|
||||
const isTextOrSubcatoryNonEmpty = (subcategory && subcategory !== '') ||
|
||||
(displayTitle && displayTitle !== '');
|
||||
|
|
|
|||
|
|
@ -736,7 +736,7 @@ describe('DocSearch', () => {
|
|||
// When
|
||||
let actual = DocSearch.formatHits(input);
|
||||
|
||||
let separator = '<span class="aa-suggestion-title-separator"> › </span>';
|
||||
let separator = '<span class="aa-suggestion-title-separator" aria-hidden="true"> › </span>';
|
||||
// Then
|
||||
expect(actual[0].title).toEqual('Geo-search' + separator + 'Foo' + separator + 'Bar' + separator + 'Baz');
|
||||
});
|
||||
|
|
@ -778,7 +778,7 @@ describe('DocSearch', () => {
|
|||
// When
|
||||
let actual = DocSearch.formatHits(input);
|
||||
|
||||
let separator = '<span class="aa-suggestion-title-separator"> › </span>';
|
||||
let separator = '<span class="aa-suggestion-title-separator" aria-hidden="true"> › </span>';
|
||||
// Then
|
||||
let expected = '<mark>Geo-search</mark>' + separator + '<mark>Foo</mark>' + separator +
|
||||
'<mark>Bar</mark>' + separator + '<mark>Baz</mark>';
|
||||
|
|
|
|||
Loading…
Reference in a new issue