Skip to content

A platform for community discussion. Free, open, simple.

A11Y: Label posters column on topic lists

awesomerobot23b962d9340b
diff --git a/app/assets/javascripts/discourse/app/templates/topic-list-header-column.hbr b/app/assets/javascripts/discourse/app/templates/topic-list-header-column.hbr
index 237917053b5..912acc400a3 100644
--- a/app/assets/javascripts/discourse/app/templates/topic-list-header-column.hbr
+++ b/app/assets/javascripts/discourse/app/templates/topic-list-header-column.hbr
@@ -1,4 +1,4 @@
-<th data-sort-order='{{order}}' class='{{view.className}}'>
+<th data-sort-order='{{order}}' class='{{view.className}}' {{#if ariaLabel}}aria-label='{{ariaLabel}}'{{/if}}>
{{~#if canBulkSelect}}
{{~#if showBulkToggle}}
{{raw "flat-button" class="bulk-select" icon="list" title="topics.bulk.toggle"}}
diff --git a/app/assets/javascripts/discourse/app/templates/topic-list-header.hbr b/app/assets/javascripts/discourse/app/templates/topic-list-header.hbr
index e3468a1c950..ed554fa15f0 100644
--- a/app/assets/javascripts/discourse/app/templates/topic-list-header.hbr
+++ b/app/assets/javascripts/discourse/app/templates/topic-list-header.hbr
@@ -7,7 +7,7 @@
{{/if}}
{{raw "topic-list-header-column" order='default' name=listTitle bulkSelectEnabled=bulkSelectEnabled showBulkToggle=toggleInTitle canBulkSelect=canBulkSelect}}
{{#if showPosters}}
- {{raw "topic-list-header-column" order='posters'}}
+ {{raw "topic-list-header-column" order='posters' ariaLabel=(i18n "category.sort_options.posters")}}
{{/if}}
{{raw "topic-list-header-column" sortable=sortable number='true' order='posts' name='replies'}}
{{#if showLikes}}