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