mirror of
https://github.com/discourse/discourse.git
synced 2025-02-18 09:15:19 +00:00
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) {
|
if (result.icon) {
|
||||||
iconBody = iconNode(result.icon);
|
iconBody = iconNode(result.icon);
|
||||||
} else if (result.emoji) {
|
} 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 }));
|
iconBody = result.emoji.split('|').map(name => dec.attach('emoji', { name }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,6 @@ export default createWidget('emoji', {
|
|||||||
tagName: 'img.emoji',
|
tagName: 'img.emoji',
|
||||||
|
|
||||||
buildAttributes(attrs) {
|
buildAttributes(attrs) {
|
||||||
return { src: emojiUrlFor(attrs.name) };
|
return { src: emojiUrlFor(attrs.name), title: attrs.name, alt: `:${attrs.name}:` };
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user