mirror of
https://github.com/flarum/core.git
synced 2025-08-03 15:07:53 +02:00
fix: resolve a11y
warnings in Admin Frontend (#4184)
This commit is contained in:
@@ -19,7 +19,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">
|
||||
|
@@ -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
|
||||
|
@@ -59,7 +59,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>
|
||||
))}
|
||||
|
@@ -23,6 +23,7 @@ export default class Pagination<CustomAttrs extends IPaginationInterface = IPagi
|
||||
<Button
|
||||
disabled={currentPage === 1}
|
||||
title={app.translator.trans('core.lib.pagination.first_button')}
|
||||
aria-label={app.translator.trans('core.lib.pagination.first_button')}
|
||||
onclick={() => onChange(1)}
|
||||
icon="fas fa-step-backward"
|
||||
className="Button Button--icon Pagination-first"
|
||||
@@ -30,6 +31,7 @@ export default class Pagination<CustomAttrs extends IPaginationInterface = IPagi
|
||||
<Button
|
||||
disabled={currentPage === 1}
|
||||
title={app.translator.trans('core.lib.pagination.back_button')}
|
||||
aria-label={app.translator.trans('core.lib.pagination.back_button')}
|
||||
onclick={() => onChange(currentPage - 1)}
|
||||
icon="fas fa-chevron-left"
|
||||
className="Button Button--icon Pagination-back"
|
||||
@@ -77,6 +79,7 @@ export default class Pagination<CustomAttrs extends IPaginationInterface = IPagi
|
||||
<Button
|
||||
disabled={!moreData}
|
||||
title={app.translator.trans('core.lib.pagination.next_button')}
|
||||
aria-label={app.translator.trans('core.lib.pagination.next_button')}
|
||||
onclick={() => onChange(currentPage + 1)}
|
||||
icon="fas fa-chevron-right"
|
||||
className="Button Button--icon Pagination-next"
|
||||
@@ -84,6 +87,7 @@ export default class Pagination<CustomAttrs extends IPaginationInterface = IPagi
|
||||
<Button
|
||||
disabled={!moreData}
|
||||
title={app.translator.trans('core.lib.pagination.last_button')}
|
||||
aria-label={app.translator.trans('core.lib.pagination.last_button')}
|
||||
onclick={() => onChange(totalPageCount)}
|
||||
icon="fas fa-step-forward"
|
||||
className="Button Button--icon Pagination-last"
|
||||
|
@@ -310,6 +310,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
|
||||
|
Reference in New Issue
Block a user