UX: gives aria-label to topics count in category-row (#7307)

This commit is contained in:
Joffrey JAFFEUX 2019-04-02 17:38:21 +02:00 committed by GitHub
parent e77b1cf7ff
commit d8dd130477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -75,7 +75,7 @@ export default SelectKitRowComponent.extend({
"options.countSubcategories"
)
topicCount(totalCount, topicCount, countSubcats) {
return `× ${countSubcats ? totalCount : topicCount}`.htmlSafe();
return countSubcats ? totalCount : topicCount;
},
@computed("displayCategoryDescription", "category.description")

View File

@ -5,12 +5,16 @@
{{badgeForParentCategory}}
{{/unless}}
{{badgeForCategory}}
<span class="topic-count">{{topicCount}}</span>
<span class="topic-count" aria-label={{i18n "category_row.topic_count" count=topicCount}}>
&times; {{topicCount}}
</span>
</div>
{{else}}
<div class="category-status">
{{badgeForCategory}}
<span class="topic-count">{{topicCount}}</span>
<span class="topic-count" aria-label={{i18n "category_row.topic_count" count=topicCount}}>
&times; {{topicCount}}
</span>
</div>
{{/if}}

View File

@ -1429,6 +1429,9 @@ en:
conditional_loading_section:
loading: Loading...
category_row:
topic_count: "{{count}} topics in this category"
select_kit:
default_header_text: Select...
no_content: No matches found