From 1afdf6868b618a06fd95d2e713491c30d6b8c6d8 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Wed, 3 Aug 2022 15:49:39 +0200 Subject: [PATCH] SONAR-16760 [891634] ARIA hidden element must not be focusable or contain focusable elements --- .../apps/overview/branches/ActivityPanel.tsx | 39 ++-- .../__snapshots__/ActivityPanel-test.tsx.snap | 218 ++++++++++-------- .../js/components/icons/ChartLegendIcon.tsx | 2 +- .../resources/org/sonar/l10n/core.properties | 1 + 4 files changed, 140 insertions(+), 120 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx index 4176dfe0151..4868a496edc 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/ActivityPanel.tsx @@ -29,7 +29,8 @@ import { import ActivityLink from '../../../components/common/ActivityLink'; import DeferredSpinner from '../../../components/ui/DeferredSpinner'; import { parseDate } from '../../../helpers/dates'; -import { translate } from '../../../helpers/l10n'; +import { translate, translateWithParameters } from '../../../helpers/l10n'; +import { localizeMetric } from '../../../helpers/measures'; import { BranchLike } from '../../../types/branch-like'; import { GraphType, MeasureHistory } from '../../../types/project-activity'; import { Analysis as AnalysisType, Component, Metric } from '../../../types/types'; @@ -63,12 +64,8 @@ export function ActivityPanel(props: ActivityPanelProps) { metrics } = props; - const series = generateSeries( - measuresHistory, - graph, - metrics, - getDisplayedHistoryMetrics(graph, []) - ); + const displayedMetrics = getDisplayedHistoryMetrics(graph, []); + const series = generateSeries(measuresHistory, graph, metrics, displayedMetrics); const graphs = splitSeriesInGraphs(series, MAX_GRAPH_NB, MAX_SERIES_PER_GRAPH); let shownLeakPeriodDate; if (leakPeriodDate !== undefined) { @@ -93,17 +90,25 @@ export function ActivityPanel(props: ActivityPanelProps) {
-
+
- +
localizeMetric(metricKey)).join(', ') + )}> +
+ +
+
diff --git a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/ActivityPanel-test.tsx.snap b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/ActivityPanel-test.tsx.snap index 27481596a33..0dde391a2ce 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/ActivityPanel-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/overview/branches/__tests__/__snapshots__/ActivityPanel-test.tsx.snap @@ -20,7 +20,6 @@ exports[`should render correctly 1`] = ` className="display-flex-column flex-1" >
- +
+ + ] + } + /> +
+
- +
+ + ] + } + /> +
+
+