mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
A11Y: add aria-label to embedded jump link (#20117)
This commit is contained in:
@@ -8,15 +8,15 @@ createWidget("post-link-arrow", {
|
||||
tagName: "div.post-link-arrow",
|
||||
|
||||
template: hbs`
|
||||
{{#if attrs.above}}
|
||||
<a href={{attrs.shareUrl}} class="post-info arrow" title={{i18n "topic.jump_reply_up"}}>
|
||||
<a href={{attrs.shareUrl}} class="post-info arrow" title={{i18n "topic.jump_reply"}} aria-label={{i18n
|
||||
"topic.jump_reply_aria" username=attrs.name
|
||||
}}>
|
||||
{{#if attrs.above}}
|
||||
{{d-icon "arrow-up"}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a href={{attrs.shareUrl}} class="post-info arrow" title={{i18n "topic.jump_reply_down"}}>
|
||||
{{else}}
|
||||
{{d-icon "arrow-down"}}
|
||||
{{/if}}
|
||||
</a>
|
||||
{{/if}}
|
||||
`,
|
||||
});
|
||||
|
||||
@@ -44,6 +44,7 @@ export default createWidget("embedded-post", {
|
||||
h("div.topic-meta-data.embedded-reply", [
|
||||
this.attach("poster-name", attrs),
|
||||
this.attach("post-link-arrow", {
|
||||
name: attrs.username,
|
||||
above: state.above,
|
||||
shareUrl: attrs.customShare,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user