aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Peoc'h <guillaume.peoch@sonarsource.com>2022-09-01 11:45:06 +0200
committersonartech <sonartech@sonarsource.com>2022-09-02 20:02:49 +0000
commit0b64031069181e831ad630d7ba00cd8d87c12abc (patch)
treee95b3499630de93d703f437104ca429c3fbc3164
parent8888d2fdfab4589720ee7cda5173e72374aa484a (diff)
downloadsonarqube-0b64031069181e831ad630d7ba00cd8d87c12abc.tar.gz
sonarqube-0b64031069181e831ad630d7ba00cd8d87c12abc.zip
SONAR-16874 [891661] Buttons must have discernible text
-rw-r--r--server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx6
-rw-r--r--server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/__snapshots__/AssigneeRenderer-test.tsx.snap3
-rw-r--r--sonar-core/src/main/resources/org/sonar/l10n/core.properties1
3 files changed, 9 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx
index f226c2f0912..0ea9123b509 100644
--- a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx
+++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/AssigneeRenderer.tsx
@@ -54,7 +54,11 @@ export default function AssigneeRenderer(props: AssigneeRendererProps) {
{!assignee && translate('unassigned')}
</strong>
{loggedInUser && canEdit && (
- <EditButton className="spacer-left" onClick={props.onEnterEditionMode} />
+ <EditButton
+ aria-label={translate('hotspots.assignee.change_user')}
+ className="spacer-left"
+ onClick={props.onEnterEditionMode}
+ />
)}
</div>
)}
diff --git a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/__snapshots__/AssigneeRenderer-test.tsx.snap b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/__snapshots__/AssigneeRenderer-test.tsx.snap
index 6b8328a15a8..ce932bdef41 100644
--- a/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/__snapshots__/AssigneeRenderer-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/security-hotspots/components/assignee/__tests__/__snapshots__/AssigneeRenderer-test.tsx.snap
@@ -44,6 +44,7 @@ exports[`should render correctly: not editing 1`] = `
user.x_deleted.Skywalker
</strong>
<EditButton
+ aria-label="hotspots.assignee.change_user"
className="spacer-left"
onClick={[MockFunction]}
/>
@@ -64,6 +65,7 @@ exports[`should render correctly: with active assignee 1`] = `
John Doe
</strong>
<EditButton
+ aria-label="hotspots.assignee.change_user"
className="spacer-left"
onClick={[MockFunction]}
/>
@@ -84,6 +86,7 @@ exports[`should render correctly: without current assignee 1`] = `
unassigned
</strong>
<EditButton
+ aria-label="hotspots.assignee.change_user"
className="spacer-left"
onClick={[MockFunction]}
/>
diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
index 68eb96a66b5..cd3b810cf1b 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -764,6 +764,7 @@ hotspots.open_in_ide.success=Success. Switch to your IDE to see the security hot
hotspots.open_in_ide.failure=Unable to connect to your IDE to open the Security Hotspot. Please make sure you're running the latest version of SonarLint.
hotspots.assignee.select_user=Select a user...
+hotspots.assignee.change_user=Click to change assignee
hotspots.status.cannot_change_status=Changing a hotspot's status requires permission.
hotspots.status.select_status=Change status
hotspots.status.add_comment=Add a comment (Optional)