Skip to content

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

Mark up the headers in the Categories page (#5494)

Michael Howellaa6500308780
diff --git a/app/assets/javascripts/discourse/templates/components/categories-only.hbs b/app/assets/javascripts/discourse/templates/components/categories-only.hbs
index f2db6778627..f10712bb61e 100644
--- a/app/assets/javascripts/discourse/templates/components/categories-only.hbs
+++ b/app/assets/javascripts/discourse/templates/components/categories-only.hbs
@@ -2,14 +2,14 @@
<table class="category-list {{if showTopics 'with-topics'}}">
<thead>
<tr>
- <th class="category">{{i18n 'categories.category'}}</th>
+ <th class="category"><span aria-role="heading" aria-level="2" id="categories-only-category">{{i18n 'categories.category'}}</span></th>
<th class="topics">{{i18n 'categories.topics'}}</th>
{{#if showTopics}}
<th class="latest">{{i18n 'categories.latest'}}</th>
{{/if}}
</tr>
</thead>
- <tbody>
+ <tbody aria-labelledby="categories-only-category">
{{#each categories as |c|}}
<tr data-category-id={{c.id}} class="{{if c.description_excerpt 'has-description' 'no-description'}} {{if c.uploaded_logo.url 'has-logo' 'no-logo'}}">
<td class="category" style={{border-color c.color}}>
diff --git a/app/assets/javascripts/discourse/templates/components/latest-topic-list.hbs b/app/assets/javascripts/discourse/templates/components/latest-topic-list.hbs
index 2390a154ab4..4b339c3f3f0 100644
--- a/app/assets/javascripts/discourse/templates/components/latest-topic-list.hbs
+++ b/app/assets/javascripts/discourse/templates/components/latest-topic-list.hbs
@@ -1,4 +1,4 @@
-<div class='table-heading'>
+<div class='table-heading' aria-role="heading" aria-level="2">
{{i18n "filters.latest.title"}}
</div>