Merge pull request #54 from microsoft/user/apc/search-results
Accessibility fix to provide auditory feedback on search results
This commit is contained in:
Коммит
b6ff9b8f07
|
@ -30,7 +30,7 @@ autocomplete('#search-input', { hint: false }, [
|
|||
if (!resultHeading) {
|
||||
resultHeading = suggestion.slug || suggestion.url || '(Untitled)';
|
||||
}
|
||||
var result = '<b>' + resultHeading + '</b>';
|
||||
var result = '<b aria-live="assertive">' + resultHeading + '</b>';
|
||||
if (suggestion._snippetResult && suggestion._snippetResult.content) {
|
||||
result += '<br />' + suggestion._snippetResult.content.value;
|
||||
}
|
||||
|
@ -40,7 +40,8 @@ autocomplete('#search-input', { hint: false }, [
|
|||
else if (suggestion.content) {
|
||||
result += '<br />' + suggestion.content;
|
||||
}
|
||||
return '<p>' + result + '</p>';
|
||||
|
||||
return '<p>' + result + '</p>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ autocomplete('#search-input', { hint: false }, [
|
|||
resultHeading = suggestion.slug || suggestion.url || '(Untitled)';
|
||||
}
|
||||
|
||||
let result = '<b>' + resultHeading + '</b>';
|
||||
let result = '<b aria-live="assertive">' + resultHeading + '</b>';
|
||||
|
||||
if (suggestion._snippetResult && suggestion._snippetResult.content) {
|
||||
result += '<br />' + suggestion._snippetResult.content.value;
|
||||
|
|
Загрузка…
Ссылка в новой задаче