A11Y: add aria-label to embedded jump link (#20117)
This commit is contained in:
parent
5a7b942aff
commit
adbf69c300
|
@ -8,15 +8,15 @@ createWidget("post-link-arrow", {
|
|||
tagName: "div.post-link-arrow",
|
||||
|
||||
template: hbs`
|
||||
<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}}
|
||||
<a href={{attrs.shareUrl}} class="post-info arrow" title={{i18n "topic.jump_reply_up"}}>
|
||||
{{d-icon "arrow-up"}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a href={{attrs.shareUrl}} class="post-info arrow" title={{i18n "topic.jump_reply_down"}}>
|
||||
{{d-icon "arrow-down"}}
|
||||
</a>
|
||||
{{/if}}
|
||||
</a>
|
||||
`,
|
||||
});
|
||||
|
||||
|
@ -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,
|
||||
}),
|
||||
|
|
|
@ -2976,8 +2976,8 @@ en:
|
|||
browse_all_tags_or_latest: "<a href='%{basePath}/tags'>Browse all tags</a> or <a href='%{basePath}/latest'>view latest topics</a>."
|
||||
|
||||
suggest_create_topic: Ready to <a href>start a new conversation?</a>
|
||||
jump_reply_up: jump to earlier reply
|
||||
jump_reply_down: jump to later reply
|
||||
jump_reply: "Jump to post's original location"
|
||||
jump_reply_aria: "Jump to @%{username}'s post in its original location"
|
||||
deleted: "The topic has been deleted"
|
||||
|
||||
slow_mode_update:
|
||||
|
|
Loading…
Reference in New Issue