aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/app
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2022-07-28 12:27:22 +0200
committersonartech <sonartech@sonarsource.com>2022-07-29 20:03:15 +0000
commite065238f78d43dbefd9f429b56bc764c79101df0 (patch)
tree01fa368833ff5d7eefa731a6840c7ffb9539565e /server/sonar-web/src/main/js/app
parent28e97acc55006a33470cd025d802f7e08482c3f7 (diff)
downloadsonarqube-e065238f78d43dbefd9f429b56bc764c79101df0.tar.gz
sonarqube-e065238f78d43dbefd9f429b56bc764c79101df0.zip
SONAR-16703 [891721] Label does not convey purpose of control
Diffstat (limited to 'server/sonar-web/src/main/js/app')
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx6
-rw-r--r--server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaKey-test.tsx4
2 files changed, 8 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx
index b7e197a83de..9457e903dfd 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/MetaKey.tsx
@@ -38,7 +38,11 @@ export default function MetaKey({ componentKey, qualifier }: MetaKeyProps) {
type="text"
value={componentKey}
/>
- <ClipboardButton className="little-spacer-left" copyValue={componentKey} />
+ <ClipboardButton
+ aria-label={translate('overview.project_key.click_to_copy')}
+ className="little-spacer-left"
+ copyValue={componentKey}
+ />
</div>
</>
);
diff --git a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaKey-test.tsx b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaKey-test.tsx
index d081a6d7c7c..dee344e4a88 100644
--- a/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaKey-test.tsx
+++ b/server/sonar-web/src/main/js/app/components/nav/component/projectInformation/meta/__tests__/MetaKey-test.tsx
@@ -28,7 +28,9 @@ it('should render correctly', () => {
expect(
screen.getByLabelText(`overview.project_key.${ComponentQualifier.Project}`)
).toBeInTheDocument();
- expect(screen.getByRole('button', { name: 'copy_to_clipboard' })).toBeInTheDocument();
+ expect(
+ screen.getByRole('button', { name: 'overview.project_key.click_to_copy' })
+ ).toBeInTheDocument();
});
function renderMetaKey(props: Partial<MetaKeyProps> = {}) {