aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViktor Vorona <viktor.vorona@sonarsource.com>2024-12-23 16:58:43 +0100
committersonartech <sonartech@sonarsource.com>2024-12-24 13:31:10 +0000
commitf413e2036c472f445353e9b4127f4ac82015bb5e (patch)
tree8b48cbb5a5012453d0a980bcefdbcdae3aee82f4
parentf5b254facace24c53468d53dd7f2aeb15b40b223 (diff)
downloadsonarqube-f413e2036c472f445353e9b4127f4ac82015bb5e.tar.gz
sonarqube-f413e2036c472f445353e9b4127f4ac82015bb5e.zip
SONAR-23785 Improve a11y for project badges
-rw-r--r--server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/badge.svg2
-rw-r--r--server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_failed.svg3
-rw-r--r--server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_passed.svg3
3 files changed, 5 insertions, 3 deletions
diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/badge.svg b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/badge.svg
index e46cf2dfe1e..def95beb777 100644
--- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/badge.svg
+++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/badge.svg
@@ -1,4 +1,4 @@
-<svg xmlns="http://www.w3.org/2000/svg" height="20" width="${totalWidth}">
+<svg role="img" xmlns="http://www.w3.org/2000/svg" height="20" width="${totalWidth}">
<!-- SONARQUBE MEASURE -->
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_failed.svg b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_failed.svg
index 1c5890d25a9..f2bcb06833a 100644
--- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_failed.svg
+++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_failed.svg
@@ -1,5 +1,6 @@
-<svg width="94" height="71" viewBox="0 0 94 71" fill="none" xmlns="http://www.w3.org/2000/svg">
+<svg role="img" width="94" height="71" viewBox="0 0 94 71" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- SONARQUBE QUALITY GATE FAIL -->
+<title>SonarQube Server Quality Gate failed</title>
<g clip-path="url(#clip0_2451_1336)">
<path d="M88.7038 71H5.29616C2.41722 71 0 68.5965 0 65.6128V5.38716C0 2.45875 2.3629 0 5.29616 0H88.7038C91.5828 0 94 2.4035 94 5.38716V65.6128C94 68.5965 91.5828 71 88.7038 71Z" fill="white"/>
<path d="M78.6811 17.9599C78.0504 17.9599 77.5064 17.8207 77.049 17.5422C76.5944 17.261 76.2436 16.8689 75.9964 16.3661C75.7521 15.8604 75.6299 15.2724 75.6299 14.6019C75.6299 13.9314 75.7521 13.3405 75.9964 12.8292C76.2436 12.315 76.5873 11.9144 77.0277 11.6275C77.4708 11.3377 77.9879 11.1928 78.5788 11.1928C78.9197 11.1928 79.2564 11.2496 79.5887 11.3633C79.9211 11.4769 80.2237 11.6616 80.4964 11.9172C80.7691 12.1701 80.9865 12.5053 81.1484 12.9229C81.3103 13.3405 81.3913 13.8547 81.3913 14.4655V14.8917H76.3459V14.0224H80.3686C80.3686 13.653 80.2947 13.3235 80.147 13.0337C80.0021 12.7439 79.7947 12.5153 79.5248 12.3476C79.2578 12.18 78.9424 12.0962 78.5788 12.0962C78.1782 12.0962 77.8316 12.1957 77.539 12.3945C77.2493 12.5905 77.0262 12.8462 76.87 13.1616C76.7137 13.4769 76.6356 13.815 76.6356 14.1758V14.7553C76.6356 15.2496 76.7209 15.6687 76.8913 16.0124C77.0646 16.3533 77.3047 16.6133 77.6115 16.7922C77.9183 16.9684 78.2748 17.0564 78.6811 17.0564C78.9453 17.0564 79.1839 17.0195 79.397 16.9457C79.6129 16.8689 79.799 16.7553 79.9552 16.6047C80.1115 16.4513 80.2322 16.261 80.3174 16.0337L81.289 16.3064C81.1868 16.636 81.0149 16.9258 80.7734 17.1758C80.5319 17.4229 80.2336 17.6161 79.8785 17.7553C79.5234 17.8917 79.1243 17.9599 78.6811 17.9599Z" fill="#3E4357"/>
diff --git a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_passed.svg b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_passed.svg
index 4b4875b4eb1..61ea3d0a020 100644
--- a/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_passed.svg
+++ b/server/sonar-webserver-webapi/src/main/resources/org/sonar/server/badge/ws/templates/sonarqube/quality_gate_passed.svg
@@ -1,5 +1,6 @@
-<svg width="94" height="71" viewBox="0 0 94 71" fill="none" xmlns="http://www.w3.org/2000/svg">
+<svg role="img" width="94" height="71" viewBox="0 0 94 71" fill="none" xmlns="http://www.w3.org/2000/svg">
<!-- SONARQUBE QUALITY GATE PASS -->
+<title>SonarQube Server Quality Gate passed</title>
<g clip-path="url(#clip0_2186_1470)">
<path d="M88.7038 71H5.29616C2.41722 71 0 68.5965 0 65.6128V5.38716C0 2.45875 2.3629 0 5.29616 0H88.7038C91.5828 0 94 2.4035 94 5.38716V65.6128C94 68.5965 91.5828 71 88.7038 71Z" fill="white"/>
<path d="M78.6811 17.9599C78.0504 17.9599 77.5064 17.8207 77.049 17.5422C76.5944 17.261 76.2436 16.8689 75.9964 16.3661C75.7521 15.8604 75.6299 15.2724 75.6299 14.6019C75.6299 13.9314 75.7521 13.3405 75.9964 12.8292C76.2436 12.315 76.5873 11.9144 77.0277 11.6275C77.4708 11.3377 77.9879 11.1928 78.5788 11.1928C78.9197 11.1928 79.2564 11.2496 79.5887 11.3633C79.9211 11.4769 80.2237 11.6616 80.4964 11.9172C80.7691 12.1701 80.9865 12.5053 81.1484 12.9229C81.3103 13.3405 81.3913 13.8547 81.3913 14.4655V14.8917H76.3459V14.0224H80.3686C80.3686 13.653 80.2947 13.3235 80.147 13.0337C80.0021 12.7439 79.7947 12.5153 79.5248 12.3476C79.2578 12.18 78.9424 12.0962 78.5788 12.0962C78.1782 12.0962 77.8316 12.1957 77.539 12.3945C77.2493 12.5905 77.0262 12.8462 76.87 13.1616C76.7137 13.4769 76.6356 13.815 76.6356 14.1758V14.7553C76.6356 15.2496 76.7209 15.6687 76.8913 16.0124C77.0646 16.3533 77.3047 16.6133 77.6115 16.7922C77.9183 16.9684 78.2748 17.0564 78.6811 17.0564C78.9453 17.0564 79.1839 17.0195 79.397 16.9457C79.6129 16.8689 79.799 16.7553 79.9552 16.6047C80.1115 16.4513 80.2322 16.261 80.3174 16.0337L81.289 16.3064C81.1868 16.636 81.0149 16.9258 80.7734 17.1758C80.5319 17.4229 80.2336 17.6161 79.8785 17.7553C79.5234 17.8917 79.1243 17.9599 78.6811 17.9599Z" fill="#3E4357"/>