Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] chore(core, tags): resolve a11y warnings in Admin Frontend #4114

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 6 additions & 1 deletion framework/core/js/src/admin/components/PermissionGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ export default class PermissionGrid<CustomAttrs extends IPermissionGridAttrs = I
<th>
{scope.label}{' '}
{!!scope.onremove && (
<Button icon="fas fa-times" className="Button Button--text PermissionGrid-removeScope" onclick={scope.onremove} />
<Button
icon="fas fa-times"
className="Button Button--text PermissionGrid-removeScope"
aria-label={app.translator.trans('core.admin.permissions.remove_scope_label', { scope: scope.label })}
onclick={scope.onremove}
/>
)}
</th>
))}
Expand Down
1 change: 1 addition & 0 deletions framework/core/locale/core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ core:
participate_heading: Participate
post_without_throttle_label: Reply multiple times without waiting
read_heading: Read
remove_scope_label: Remove scope of {scope}
rename_discussions_label: Rename discussions
reply_to_discussions_label: Reply to discussions
search_users_label: => core.ref.search_users
Expand Down
Loading