Add aria-label for buttons and selects (#234)

This commit is contained in:
Jinzhe Zeng 2021-03-31 15:46:45 -04:00 committed by GitHub
parent d46df43afe
commit 0e51e29a12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 3 deletions

View File

@ -102,6 +102,8 @@ accessibility:
nav_toggle: Toggle navigation bar
prev_page: Previous page
next_page: Next page
back_to_top: Back to top
select_lang: Select language
symbols_count_time:
count: Symbols count in article

View File

@ -87,6 +87,8 @@ accessibility:
nav_toggle: 切换导航栏
prev_page: 上一页
next_page: 下一页
back_to_top: 返回顶部
select_lang: 选择语言
symbols_count_time:
count: 本文字数
count_total: 站点总字数

View File

@ -39,7 +39,7 @@
</div>
{%- if theme.back2top.enable and theme.back2top.sidebar %}
<div class="back-to-top animated" role="button">
<div class="back-to-top animated" role="button" aria-label="{{ __('accessibility.back_to_top') }}">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>

View File

@ -5,7 +5,7 @@
<span>{{ language_name(page.lang) }}</span>
<i class="fa fa-angle-up" aria-hidden="true"></i>
</label>
<select class="lang-select" data-canonical="">
<select class="lang-select" data-canonical="" aria-label="{{ __('accessibility.select_lang') }}">
{% for language in languages %}
<option value="{{ language }}" data-href="{{ i18n_path(language) }}" selected="">
{{ language_name(language) }}

View File

@ -1,5 +1,5 @@
{%- if theme.back2top.enable and not theme.back2top.sidebar %}
<div class="back-to-top" role="button">
<div class="back-to-top" role="button" aria-label="{{ __('accessibility.back_to_top') }}">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>