From bd09718cf6b0dc55d2d67bd67fad5c05ce5e10ea Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Mon, 6 Jul 2020 22:27:04 -0700 Subject: [PATCH] fix: improve a11y of autosuggest labels (#1830) --- src/routes/_utils/createAutosuggestAccessibleLabel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/_utils/createAutosuggestAccessibleLabel.js b/src/routes/_utils/createAutosuggestAccessibleLabel.js index 8c46ce9a..e4eec85b 100644 --- a/src/routes/_utils/createAutosuggestAccessibleLabel.js +++ b/src/routes/_utils/createAutosuggestAccessibleLabel.js @@ -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