]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-16841 Button: Button does not have a name
authorMathieu Suen <mathieu.suen@sonarsource.com>
Wed, 31 Aug 2022 09:10:39 +0000 (11:10 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 1 Sep 2022 20:03:03 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/IssueSourceViewerHeader.tsx
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/__tests__/__snapshots__/IssueSourceViewerHeader-test.tsx.snap
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index e5695f6ec994341145f5d047b5c3cec0de3777ed..c8875ca4bebb7b5f0a614544166085455f6bb82d 100644 (file)
@@ -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>
index da1a96235448afc1439aa33e9a0649f92fff1bde..aa530aecd3007f7ded3cacf4fa9dece3cce46980 100644 (file)
@@ -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]}
       >
index 304b0f418e807af3217f59e354e5b4459f50003a..f1966319dc2c56c24b2aa06420ac9615694901ca 100644 (file)
@@ -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