refactor: add aria-hidden

This commit is contained in:
crimx 2020-10-03 13:59:08 +08:00
parent d25bb3ae34
commit 0df8258d29

View file

@ -120,9 +120,9 @@ function renderEmoji(name) {
: " ";
return (
`<span class="${options.className}" aria-hidden="true"${styles}>` +
`<span class="${options.className}"${styles}>` +
`<span>${codepoints}</span>` +
`<img src="${emojis[name].src}" onerror="this.parent.classList.add('${options.className}-fallback')">` +
`<img src="${emojis[name].src}" aria-hidden="true" onerror="this.parent.classList.add('${options.className}-fallback')">` +
`</span>`
);
}