fix: put annotation in title/aria-label #369
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #366
The
title
now comes from theannotation
(if available - custom emoji may not have these). If not, it falls back to the shortcodes separated by a comma.I also added the
annotation
to thearia-label
because it seems like a nice enhancement – the annotation is often a better description than the shortcodes.I don't see a reason to remove the shortcodes from the
aria-label
– it's just additional information, and the screenreader user can tab to the next emoji if they don't want to hear the shortcodes listed.One downside of this is that there is no way for a sighted mouse user to figure out the shortcodes, but this is not vital to me since sighted mobile users were never able to see the
title
anyway.