FIX: Add `alt` and `title` attribute to emoji widget.
This commit is contained in:
parent
b5dc68cd52
commit
64b5c81843
|
@ -93,11 +93,6 @@ class PluginApi {
|
|||
if (result.icon) {
|
||||
iconBody = iconNode(result.icon);
|
||||
} else if (result.emoji) {
|
||||
iconBody = result.emoji.split('|').map(emoji => {
|
||||
const src = emojiUrlFor(emoji);
|
||||
return dec.h('img', { className: 'emoji', attributes: { src } });
|
||||
});
|
||||
|
||||
iconBody = result.emoji.split('|').map(name => dec.attach('emoji', { name }));
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,6 @@ export default createWidget('emoji', {
|
|||
tagName: 'img.emoji',
|
||||
|
||||
buildAttributes(attrs) {
|
||||
return { src: emojiUrlFor(attrs.name) };
|
||||
return { src: emojiUrlFor(attrs.name), title: attrs.name, alt: `:${attrs.name}:` };
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue