fix: improve a11y of autosuggest labels (#1830)

This commit is contained in:
Nolan Lawson 2020-07-06 22:27:04 -07:00 committed by GitHub
parent 780db2be22
commit bd09718cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ export function createAutosuggestAccessibleLabel (
const selected = searchResults[selectedIndex]
let label
if (autosuggestType === 'emoji') {
label = `${selected.unicode || selected.name}`
label = selected.name || [selected.unicode].concat(selected.shortcodes).join(', ')
} else if (autosuggestType === 'hashtag') {
label = `#${selected.name}`
} else { // account