]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22303 Fix aria-label misuse (Deque issue #1742007)
authorDavid Cho-Lerat <david.cho-lerat@sonarsource.com>
Mon, 29 Jul 2024 08:45:00 +0000 (10:45 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 30 Jul 2024 20:02:34 +0000 (20:02 +0000)
server/sonar-web/src/main/js/app/components/nav/global/MainSonarQubeBar.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 05e799562df1f09e7551282ab1b4cacec7c3ef30..3ecb9d32f1bbd33727c38106734f002de4fc094d 100644 (file)
@@ -32,7 +32,9 @@ function LogoWithAriaText() {
   const customLogoUrl = settings[GlobalSettingKeys.LogoUrl];
   const customLogoWidth = settings[GlobalSettingKeys.LogoWidth] ?? DEFAULT_CUSTOM_LOGO_WIDTH_IN_PX;
 
-  const title = translate('layout.nav.home_logo_alt');
+  const title = customLogoUrl
+    ? translate('layout.nav.home_logo_alt')
+    : translate('layout.nav.home_sonarqube_logo_alt');
 
   return (
     <div aria-label={title} role="img">
index 1d28a55a9ba2edeff77594619831b42f443b41e3..d8dff3b0c34ae6781a7f5f0d228be0706031654d 100644 (file)
@@ -585,6 +585,7 @@ layout.settings.VW=Portfolio Settings
 layout.settings.SVW=Portfolio Settings
 layout.security_reports=Security Reports
 layout.nav.home_logo_alt=Logo, link to homepage
+layout.nav.home_sonarqube_logo_alt=SonarQube logo, link to homepage
 layout.must_be_configured=This will be available once your project is configured and analyzed.
 layout.all_project_must_be_accessible=You need access to all projects within this {0} to access it.