Browse Source

Accessibility: Make emoji categories a listbox

Danilo Bargen 6 years ago
parent
commit
ab514fab18
2 changed files with 1133 additions and 1133 deletions
  1. 1131 1131
      src/partials/emoji-picker.html
  2. 2 2
      tools/twemoji/generate-emoji-picker.py

File diff suppressed because it is too large
+ 1131 - 1131
src/partials/emoji-picker.html


+ 2 - 2
tools/twemoji/generate-emoji-picker.py

@@ -40,13 +40,13 @@ for i, category in enumerate(category_order):
     print('        <label for="tab-%d" title="%s">' % (i, category['name']))
     print('            <img src="emoji/{0}.svg" class="em-{0}" height="24" width="24" role="button" tabindex="0"></span>'.format(category['id']))
     print('        </label>')
-    print('        <div class="content">')
+    print('        <div class="content" role="listbox">')
     for emoji in groups[category['id']]:
         if emoji['representation'] == 'emoji-default':
             hex_codepoint = emoji['codepoint'].lower()
         else:
             hex_codepoint = emoji['codepoint_fully_qualified']
-        print('            <span class="em em-{3}-{0}" data-c="{0}" data-s="{1}" title="{2}">{4}</span>'.format(
+        print('            <span class="em em-{3}-{0}" role="option" data-c="{0}" data-s="{1}" title="{2}">{4}</span>'.format(
             emoji['codepoint'].lower(),
             emoji['shortname'],
             emoji['name'],

Some files were not shown because too many files changed in this diff