aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Suen <mathieu.suen@sonarsource.com>2022-08-31 11:10:39 +0200
committersonartech <sonartech@sonarsource.com>2022-09-01 20:03:03 +0000
commitd0feebf94738f1699ee189186c722c8caf0563f6 (patch)
treede7d73b1a886be985dd92429cfc804cdfbb16c16
parent9185f39150cc10ac9452632a66166c5decbb3e17 (diff)
downloadsonarqube-d0feebf94738f1699ee189186c722c8caf0563f6.tar.gz
sonarqube-d0feebf94738f1699ee189186c722c8caf0563f6.zip
SONAR-16841 Button: Button does not have a name
-rw-r--r--server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx5
-rw-r--r--server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/IssueSourceViewerHeader-test.tsx.snap4
-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/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx
index e5695f6ec99..c8875ca4beb 100644
--- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx
+++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx
@@ -121,7 +121,10 @@ export default function IssueSourceViewerHeader(props: Props) {
{expandable && (
<DeferredSpinner className="little-spacer-right" loading={loading}>
<div className="flex-0 big-spacer-left">
- <ButtonIcon className="js-actions" onClick={onExpand}>
+ <ButtonIcon
+ aria-label={translate('source_viewer.expand_all_lines')}
+ className="js-actions"
+ onClick={onExpand}>
<ExpandSnippetIcon />
</ButtonIcon>
</div>
diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/IssueSourceViewerHeader-test.tsx.snap b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/IssueSourceViewerHeader-test.tsx.snap
index da1a9623544..aa530aecd30 100644
--- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/IssueSourceViewerHeader-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/IssueSourceViewerHeader-test.tsx.snap
@@ -73,6 +73,7 @@ exports[`should render correctly 1`] = `
className="flex-0 big-spacer-left"
>
<ButtonIcon
+ aria-label="source_viewer.expand_all_lines"
className="js-actions"
onClick={[MockFunction]}
>
@@ -151,6 +152,7 @@ exports[`should render correctly: no link to project 1`] = `
className="flex-0 big-spacer-left"
>
<ButtonIcon
+ aria-label="source_viewer.expand_all_lines"
className="js-actions"
onClick={[MockFunction]}
>
@@ -218,6 +220,7 @@ exports[`should render correctly: no project name 1`] = `
className="flex-0 big-spacer-left"
>
<ButtonIcon
+ aria-label="source_viewer.expand_all_lines"
className="js-actions"
onClick={[MockFunction]}
>
@@ -261,6 +264,7 @@ exports[`should render correctly: project root 1`] = `
className="flex-0 big-spacer-left"
>
<ButtonIcon
+ aria-label="source_viewer.expand_all_lines"
className="js-actions"
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 304b0f418e8..f1966319dc2 100644
--- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties
+++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties
@@ -2828,6 +2828,7 @@ component_viewer.no_component=The component has been removed or never existed.
component_viewer.copy_path_to_clipboard=Copy the file path to the clipboard
source_viewer.view_all_issues=See all issues in this file
+source_viewer.expand_all_lines=Show all lines of code
source_viewer.covered=Covered by the following tests
source_viewer.not_covered=Not covered by tests
source_viewer.conditions=conditions