From ddc5ae6f4dc782026f289f7e1a3f71f1739f3b1a Mon Sep 17 00:00:00 2001 From: Yunwen Zheng Date: Thu, 23 Oct 2025 11:25:26 -0400 Subject: [PATCH] Git Sync UI a11y finding fixes (#112751) * ProgressBar: progressbar nodes must have accsible name fix * BrowseActions: Bulk move and delete drawwer a11y fix * FolderActionsButton: Move and delete drawer a11y fix * ConfigForm: a11y fix missing id * GettingStarted: Skip img alt since its decorative * JobContent: heading a11y fix * StatusBadge: add displayOnly prop to avoid cursor pointer display when its not necessary * RepositoryTypeCards: Card missing discernible text * i18n * input id fix --- .../BrowseActions/BrowseActions.tsx | 16 ++++-- .../components/FolderActionsButton.tsx | 14 +++-- .../provisioning/Config/ConfigForm.tsx | 4 +- .../GettingStarted/GettingStarted.tsx | 3 +- .../features/provisioning/Job/JobContent.tsx | 2 +- .../Repository/RepositoryActions.tsx | 2 +- .../provisioning/Shared/ProgressBar.tsx | 10 +++- .../Shared/RepositoryTypeCards.tsx | 52 ++++++++++--------- .../provisioning/Shared/StatusBadge.tsx | 12 +++-- public/locales/en-US/grafana.json | 5 ++ 10 files changed, 81 insertions(+), 39 deletions(-) diff --git a/public/app/features/browse-dashboards/components/BrowseActions/BrowseActions.tsx b/public/app/features/browse-dashboards/components/BrowseActions/BrowseActions.tsx index d703846925b..9ab6c750585 100644 --- a/public/app/features/browse-dashboards/components/BrowseActions/BrowseActions.tsx +++ b/public/app/features/browse-dashboards/components/BrowseActions/BrowseActions.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { Trans, t } from '@grafana/i18n'; import { config, reportInteraction } from '@grafana/runtime'; -import { Button, Drawer, Stack } from '@grafana/ui'; +import { Button, Drawer, Stack, Text } from '@grafana/ui'; import appEvents from 'app/core/app_events'; import { ManagerKind } from 'app/features/apiserver/types'; import { BulkDeleteProvisionedResource } from 'app/features/provisioning/components/BulkActions/BulkDeleteProvisionedResource'; @@ -152,7 +152,12 @@ export function BrowseActions({ folderDTO }: Props) { {/* bulk delete */} {showBulkDeleteProvisionedResource && ( + {t('browse-dashboards.action.bulk-delete-provisioned-resources', 'Bulk Delete Provisioned Resources')} + + } onClose={() => setShowBulkDeleteProvisionedResource(false)} size="md" > @@ -169,7 +174,12 @@ export function BrowseActions({ folderDTO }: Props) { {/* bulk move */} {showBulkMoveProvisionedResource && ( + {t('browse-dashboards.action.bulk-move-provisioned-resources', 'Bulk Move Provisioned Resources')} + + } onClose={() => setShowBulkMoveProvisionedResource(false)} size="md" > diff --git a/public/app/features/browse-dashboards/components/FolderActionsButton.tsx b/public/app/features/browse-dashboards/components/FolderActionsButton.tsx index fcdfd203c0a..2fc2a30a32f 100644 --- a/public/app/features/browse-dashboards/components/FolderActionsButton.tsx +++ b/public/app/features/browse-dashboards/components/FolderActionsButton.tsx @@ -3,7 +3,7 @@ import { useState } from 'react'; import { AppEvents } from '@grafana/data'; import { Trans, t } from '@grafana/i18n'; import { locationService, reportInteraction } from '@grafana/runtime'; -import { Button, Drawer, Dropdown, Icon, Menu, MenuItem } from '@grafana/ui'; +import { Button, Drawer, Dropdown, Icon, Menu, MenuItem, Text } from '@grafana/ui'; import { Permissions } from 'app/core/components/AccessControl/Permissions'; import { appEvents } from 'app/core/core'; import { RepoType } from 'app/features/provisioning/Wizard/types'; @@ -180,7 +180,11 @@ export function FolderActionsButton({ folder, repoType, isReadOnlyRepo }: Props) )} {showDeleteProvisionedFolderDrawer && ( + {t('browse-dashboards.action.delete-provisioned-folder', 'Delete provisioned folder')} + + } subtitle={folder.title} onClose={() => setShowDeleteProvisionedFolderDrawer(false)} > @@ -192,7 +196,11 @@ export function FolderActionsButton({ folder, repoType, isReadOnlyRepo }: Props) )} {showMoveProvisionedFolderDrawer && ( + {t('browse-dashboards.action.move-provisioned-folder', 'Move provisioned folder')} + + } subtitle={folder.title} onClose={() => setShowMoveProvisionedFolderDrawer(false)} > diff --git a/public/app/features/provisioning/Config/ConfigForm.tsx b/public/app/features/provisioning/Config/ConfigForm.tsx index e44a103c408..211422b0c2a 100644 --- a/public/app/features/provisioning/Config/ConfigForm.tsx +++ b/public/app/features/provisioning/Config/ConfigForm.tsx @@ -162,7 +162,7 @@ export function ConfigForm({ data }: ConfigFormProps) { - + - + )} diff --git a/public/app/features/provisioning/GettingStarted/GettingStarted.tsx b/public/app/features/provisioning/GettingStarted/GettingStarted.tsx index de986fe4748..d38c19c9fd5 100644 --- a/public/app/features/provisioning/GettingStarted/GettingStarted.tsx +++ b/public/app/features/provisioning/GettingStarted/GettingStarted.tsx @@ -153,7 +153,8 @@ export default function GettingStarted({ items }: Props) {
- {'Grafana + {/* decorative img, use empty str to skip alt*/} +
- + {message ?? state ?? t('provisioning.job-status.starting', 'Starting...')} diff --git a/public/app/features/provisioning/Repository/RepositoryActions.tsx b/public/app/features/provisioning/Repository/RepositoryActions.tsx index edadb2b538e..a7aa3b71f5a 100644 --- a/public/app/features/provisioning/Repository/RepositoryActions.tsx +++ b/public/app/features/provisioning/Repository/RepositoryActions.tsx @@ -27,7 +27,7 @@ export function RepositoryActions({ repository }: RepositoryActionsProps) { return ( {isReadOnlyRepo && } - + {repoHref && (