Skip to content

Commit c20c48e

Browse files
chore: add accessible label to edit tag button
1 parent 82d3db7 commit c20c48e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

extensions/tags/js/src/admin/components/TagsPage.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,12 @@ function tagItem(tag) {
1616
<div className="TagListItem-info">
1717
{tagIcon(tag)}
1818
<span className="TagListItem-name">{tag.name()}</span>
19-
<Button className="Button Button--link" icon="fas fa-pencil-alt" onclick={() => app.modal.show(EditTagModal, { model: tag })} />
19+
<Button
20+
className="Button Button--link"
21+
icon="fas fa-pencil-alt"
22+
aria-label={app.translator.trans('flarum-tags.admin.tags.edit_tag_label', { tag: tag.name() })}
23+
onclick={() => app.modal.show(EditTagModal, { model: tag })}
24+
/>
2025
</div>
2126
{!tag.isChild() && tag.position() !== null && (
2227
<ol className="TagListItem-children TagList">

extensions/tags/locale/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ flarum-tags:
5656
about_tags_text: "Tags are used to categorize discussions. Primary tags are like traditional forum categories: they can be arranged in a two-level hierarchy. Secondary tags do not have hierarchy or order, and are useful for micro-categorization."
5757
create_primary_tag_button: Create Primary Tag
5858
create_secondary_tag_button: Create Secondary Tag
59+
edit_tag_label: Edit Tag {tag}
5960
primary_heading: Primary Tags
6061
secondary_heading: Secondary Tags
6162
settings_heading: Settings

0 commit comments

Comments
 (0)