mirror of
https://github.com/discourse/discourse.git
synced 2025-04-25 17:34:40 +08:00
UX: uses presentation role for accessibility in topic map (#6561)
Co-Authored-By: mwcampbell <mwc+github@mwcampbell.us>
This commit is contained in:
parent
1ac3e5473a
commit
4d74688b50
@ -86,7 +86,11 @@ createWidget("topic-map-summary", {
|
|||||||
const contents = [];
|
const contents = [];
|
||||||
contents.push(
|
contents.push(
|
||||||
h("li", [
|
h("li", [
|
||||||
h("h4", I18n.t("created_lowercase")),
|
h(
|
||||||
|
"h4",
|
||||||
|
{ attributes: { role: "presentation" } },
|
||||||
|
I18n.t("created_lowercase")
|
||||||
|
),
|
||||||
h("div.topic-map-post.created-at", [
|
h("div.topic-map-post.created-at", [
|
||||||
avatarFor("tiny", {
|
avatarFor("tiny", {
|
||||||
username: attrs.createdByUsername,
|
username: attrs.createdByUsername,
|
||||||
@ -101,7 +105,11 @@ createWidget("topic-map-summary", {
|
|||||||
h(
|
h(
|
||||||
"li",
|
"li",
|
||||||
h("a", { attributes: { href: attrs.lastPostUrl } }, [
|
h("a", { attributes: { href: attrs.lastPostUrl } }, [
|
||||||
h("h4", I18n.t("last_reply_lowercase")),
|
h(
|
||||||
|
"h4",
|
||||||
|
{ attributes: { role: "presentation" } },
|
||||||
|
I18n.t("last_reply_lowercase")
|
||||||
|
),
|
||||||
h("div.topic-map-post.last-reply", [
|
h("div.topic-map-post.last-reply", [
|
||||||
avatarFor("tiny", {
|
avatarFor("tiny", {
|
||||||
username: attrs.lastPostUsername,
|
username: attrs.lastPostUsername,
|
||||||
@ -116,13 +124,21 @@ createWidget("topic-map-summary", {
|
|||||||
contents.push(
|
contents.push(
|
||||||
h("li", [
|
h("li", [
|
||||||
numberNode(attrs.topicReplyCount),
|
numberNode(attrs.topicReplyCount),
|
||||||
h("h4", I18n.t("replies_lowercase", { count: attrs.topicReplyCount }))
|
h(
|
||||||
|
"h4",
|
||||||
|
{ attributes: { role: "presentation" } },
|
||||||
|
I18n.t("replies_lowercase", { count: attrs.topicReplyCount })
|
||||||
|
)
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
contents.push(
|
contents.push(
|
||||||
h("li.secondary", [
|
h("li.secondary", [
|
||||||
numberNode(attrs.topicViews, { className: attrs.topicViewsHeat }),
|
numberNode(attrs.topicViews, { className: attrs.topicViewsHeat }),
|
||||||
h("h4", I18n.t("views_lowercase", { count: attrs.topicViews }))
|
h(
|
||||||
|
"h4",
|
||||||
|
{ attributes: { role: "presentation" } },
|
||||||
|
I18n.t("views_lowercase", { count: attrs.topicViews })
|
||||||
|
)
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -130,7 +146,11 @@ createWidget("topic-map-summary", {
|
|||||||
contents.push(
|
contents.push(
|
||||||
h("li.secondary", [
|
h("li.secondary", [
|
||||||
numberNode(attrs.participantCount),
|
numberNode(attrs.participantCount),
|
||||||
h("h4", I18n.t("users_lowercase", { count: attrs.participantCount }))
|
h(
|
||||||
|
"h4",
|
||||||
|
{ attributes: { role: "presentation" } },
|
||||||
|
I18n.t("users_lowercase", { count: attrs.participantCount })
|
||||||
|
)
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -139,7 +159,11 @@ createWidget("topic-map-summary", {
|
|||||||
contents.push(
|
contents.push(
|
||||||
h("li.secondary", [
|
h("li.secondary", [
|
||||||
numberNode(attrs.topicLikeCount),
|
numberNode(attrs.topicLikeCount),
|
||||||
h("h4", I18n.t("likes_lowercase", { count: attrs.topicLikeCount }))
|
h(
|
||||||
|
"h4",
|
||||||
|
{ attributes: { role: "presentation" } },
|
||||||
|
I18n.t("likes_lowercase", { count: attrs.topicLikeCount })
|
||||||
|
)
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -148,7 +172,11 @@ createWidget("topic-map-summary", {
|
|||||||
contents.push(
|
contents.push(
|
||||||
h("li.secondary", [
|
h("li.secondary", [
|
||||||
numberNode(attrs.topicLinkLength),
|
numberNode(attrs.topicLinkLength),
|
||||||
h("h4", I18n.t("links_lowercase", { count: attrs.topicLinkLength }))
|
h(
|
||||||
|
"h4",
|
||||||
|
{ attributes: { role: "presentation" } },
|
||||||
|
I18n.t("links_lowercase", { count: attrs.topicLinkLength })
|
||||||
|
)
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user