Emoticons are now also readable for screen readers
This commit is contained in:
parent
7cea17cc31
commit
a00f861075
@ -19,13 +19,15 @@ $plugin_emoticons = array(
|
|||||||
':heart_eyes:' => '😍',
|
':heart_eyes:' => '😍',
|
||||||
':sunglasses:' => '😎',
|
':sunglasses:' => '😎',
|
||||||
':laughing:' => '😆',
|
':laughing:' => '😆',
|
||||||
|
':joy:' => '😂',
|
||||||
':neutral_face:' => '😐',
|
':neutral_face:' => '😐',
|
||||||
':flushed:' => '😳',
|
':flushed:' => '😳',
|
||||||
|
':hushed:' => '😮',
|
||||||
':dizzy_face:' => '😵',
|
':dizzy_face:' => '😵',
|
||||||
':cry:' => '😢',
|
':cry:' => '😢',
|
||||||
':persevere:' => '😣',
|
':persevere:' => '😣',
|
||||||
':worried:' => '😟',
|
':worried:' => '😟',
|
||||||
':hushed:' => '😮',
|
':angry:' => '😠',
|
||||||
':mag:' => '🔍',
|
':mag:' => '🔍',
|
||||||
':hot_beverage:' => '☕',
|
':hot_beverage:' => '☕',
|
||||||
':exclamation:' => '❗',
|
':exclamation:' => '❗',
|
||||||
@ -54,7 +56,8 @@ function plugin_emoticons_filter ($emostring) {
|
|||||||
foreach ($plugin_emoticons as $text => $emoticon) {
|
foreach ($plugin_emoticons as $text => $emoticon) {
|
||||||
$emostring = str_replace(
|
$emostring = str_replace(
|
||||||
$text,
|
$text,
|
||||||
$emoticon,
|
// Is better for screen readers
|
||||||
|
'<span role="img" aria-label="Emoji ' . htmlentities($text) . '">' . $emoticon . '</span>',
|
||||||
$emostring
|
$emostring
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user