aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/projects
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2019-12-23 15:27:36 +0100
committerSonarTech <sonartech@sonarsource.com>2020-01-02 20:46:12 +0100
commit09ffc0426665ec9fe093520ae510645a08743bd3 (patch)
tree348a68a232c57cd01c83d386b3d9d95757da513b /server/sonar-web/src/main/js/apps/projects
parentc8d4cd257944527198147e53aaa017b6aaa55822 (diff)
downloadsonarqube-09ffc0426665ec9fe093520ae510645a08743bd3.tar.gz
sonarqube-09ffc0426665ec9fe093520ae510645a08743bd3.zip
SONAR-12877 Add aria-label attributes to quality gate badges when necessary
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projects')
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/ProjectCardQualityGate.tsx2
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardQualityGate-test.tsx.snap1
2 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardQualityGate.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardQualityGate.tsx
index bb636f9a726..0fe4cc4bd87 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardQualityGate.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardQualityGate.tsx
@@ -42,7 +42,7 @@ export default function ProjectCardQualityGate({ status }: Props) {
<div className="project-card-quality-gate big-spacer-left">
<Tooltip overlay={tooltip}>
<div className="project-card-measure-inner">
- <Level level={status} small={true} />
+ <Level aria-label={translate('quality_gates.status')} level={status} small={true} />
{status === 'WARN' && (
<HelpTooltip
className="little-spacer-left"
diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardQualityGate-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardQualityGate-test.tsx.snap
index 3ee649a24d7..cbf5ab95857 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardQualityGate-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardQualityGate-test.tsx.snap
@@ -11,6 +11,7 @@ exports[`renders 1`] = `
className="project-card-measure-inner"
>
<Level
+ aria-label="quality_gates.status"
level="ERROR"
small={true}
/>