Skip to content

Commit

Permalink
chore: add accessible label to edit tag button
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideIadeluca committed Nov 15, 2024
1 parent 82d3db7 commit c20c48e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion extensions/tags/js/src/admin/components/TagsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ function tagItem(tag) {
<div className="TagListItem-info">
{tagIcon(tag)}
<span className="TagListItem-name">{tag.name()}</span>
<Button className="Button Button--link" icon="fas fa-pencil-alt" onclick={() => app.modal.show(EditTagModal, { model: tag })} />
<Button
className="Button Button--link"
icon="fas fa-pencil-alt"
aria-label={app.translator.trans('flarum-tags.admin.tags.edit_tag_label', { tag: tag.name() })}
onclick={() => app.modal.show(EditTagModal, { model: tag })}
/>
</div>
{!tag.isChild() && tag.position() !== null && (
<ol className="TagListItem-children TagList">
Expand Down
1 change: 1 addition & 0 deletions extensions/tags/locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ flarum-tags:
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."
create_primary_tag_button: Create Primary Tag
create_secondary_tag_button: Create Secondary Tag
edit_tag_label: Edit Tag {tag}
primary_heading: Primary Tags
secondary_heading: Secondary Tags
settings_heading: Settings
Expand Down

0 comments on commit c20c48e

Please sign in to comment.