fix: improve a11y of autosuggest labels (#1830)
This commit is contained in:
parent
780db2be22
commit
bd09718cf6
|
@ -6,7 +6,7 @@ export function createAutosuggestAccessibleLabel (
|
||||||
const selected = searchResults[selectedIndex]
|
const selected = searchResults[selectedIndex]
|
||||||
let label
|
let label
|
||||||
if (autosuggestType === 'emoji') {
|
if (autosuggestType === 'emoji') {
|
||||||
label = `${selected.unicode || selected.name}`
|
label = selected.name || [selected.unicode].concat(selected.shortcodes).join(', ')
|
||||||
} else if (autosuggestType === 'hashtag') {
|
} else if (autosuggestType === 'hashtag') {
|
||||||
label = `#${selected.name}`
|
label = `#${selected.name}`
|
||||||
} else { // account
|
} else { // account
|
||||||
|
|
Loading…
Reference in a new issue