Making emoji fonts more accessible.
Steps
Step 1: fix bb-code and markdown
Step 2: fix emoji management and packs. Add emoji-font emoji pack support (see below)
Step 3: Add BB-code tag [emoji font="..."]...[/emoji]
:
Tag should render [emoji font="mario64"]lol[/emoji]
into <span data-type="emoji-font" role="figure" aria-label="lol">:mario64-l::mario64-o::mario64-l:</span>
and into pleroma.content['text/plain']
as lol
Step 4: add similar thing pleroma.content['text/plain']
to users and do same for user titles.
Definition, implementation details
Emoji-font emoji pack specifies how emoji fonts should work:
- which characters are supported
- case sensitivity
- which case to use for plaintext version
- symbol conversion (i.e. translating cyrillic symbols)
- how emoji are formed, i.e. prefix
- future features?
Emoji-font pack should be just a special case of a regular emoji pack.
Error messages when emoji-font tag has illegal (unsupported) symbols to prevent mistakes, possibly with "override" function.
Benefits:
-
arial-label
will make screen readers read the label "lol" instead of "colon mario sixty four dash ehl colon colon mario..." -
text/plain
will allow FE to display notifications with proper text instead colon-colon-garbage. I'm looking at you, dielan. - possibility for FE to strip emoji-font images and format them otherwise
- possibility to implement non-square emoji fonts or using spritesheets for emoji-fonts
- users who love to use emoji fonts will have an easier way of using them while not being obnoxious to everyone else
Further ideas:
- parse existing statuses for emoji-font clusters and figure out their patterns to present them better?
- actually check how
aria-label
andaria-description
work and what would be a better choice - better attribute instead of
data-type
? - separate emoji in emoji-fonts with ZWNBSP to prevent unnatural word-breaks?