From 345023242bde5276df16b111f53dba1bfb115afe Mon Sep 17 00:00:00 2001 From: Davide Iadeluca <146922689+DavideIadeluca@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:57:49 +0100 Subject: [PATCH] [1.x] chore(core, tags): resolve `a11y` warnings in Admin Frontend (#4114) * chore: add accessible label to scope removal button * chore: add accessible label to edit tag button --- extensions/tags/js/src/admin/components/TagsPage.js | 7 ++++++- extensions/tags/locale/en.yml | 1 + framework/core/js/src/admin/components/PermissionGrid.tsx | 7 ++++++- framework/core/locale/core.yml | 1 + 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/extensions/tags/js/src/admin/components/TagsPage.js b/extensions/tags/js/src/admin/components/TagsPage.js index 4564869bb9..54611b4fc8 100644 --- a/extensions/tags/js/src/admin/components/TagsPage.js +++ b/extensions/tags/js/src/admin/components/TagsPage.js @@ -16,7 +16,12 @@ function tagItem(tag) {
{tagIcon(tag)} {tag.name()} -
{!tag.isChild() && tag.position() !== null && (
    diff --git a/extensions/tags/locale/en.yml b/extensions/tags/locale/en.yml index 3890539d2d..bb44b2a73a 100644 --- a/extensions/tags/locale/en.yml +++ b/extensions/tags/locale/en.yml @@ -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 diff --git a/framework/core/js/src/admin/components/PermissionGrid.tsx b/framework/core/js/src/admin/components/PermissionGrid.tsx index 76ae8d1cb7..39d9cfbb64 100644 --- a/framework/core/js/src/admin/components/PermissionGrid.tsx +++ b/framework/core/js/src/admin/components/PermissionGrid.tsx @@ -57,7 +57,12 @@ export default class PermissionGrid {scope.label}{' '} {!!scope.onremove && ( -