A11Y: discourse-tags should have a role and label (#19977)
This commit is contained in:
parent
857f35f920
commit
4da8e15801
|
@ -1,3 +1,4 @@
|
||||||
|
import I18n from "I18n";
|
||||||
import renderTag from "discourse/lib/render-tag";
|
import renderTag from "discourse/lib/render-tag";
|
||||||
|
|
||||||
let callbacks = null;
|
let callbacks = null;
|
||||||
|
@ -56,7 +57,8 @@ export default function (topic, params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (customHtml || (tags && tags.length > 0)) {
|
if (customHtml || (tags && tags.length > 0)) {
|
||||||
buffer = "<div class='discourse-tags'>";
|
buffer = `<div class='discourse-tags' role='list'
|
||||||
|
aria-label=${I18n.t("tagging.tags")}>`;
|
||||||
if (tags) {
|
if (tags) {
|
||||||
for (let i = 0; i < tags.length; i++) {
|
for (let i = 0; i < tags.length; i++) {
|
||||||
buffer +=
|
buffer +=
|
||||||
|
|
Loading…
Reference in New Issue