]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-18870 Add labels for qualifier and visibility filters in project management...
authorstanislavh <stanislav.honcharov@sonarsource.com>
Wed, 22 Mar 2023 12:07:24 +0000 (13:07 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 22 Mar 2023 20:04:06 +0000 (20:04 +0000)
server/sonar-web/src/main/js/apps/projectsManagement/Search.tsx
server/sonar-web/src/main/js/apps/projectsManagement/__tests__/__snapshots__/Search-test.tsx.snap
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 344f574b8bbfd475499b7ddddaac91661bd16ffd..0e5e903e1a6e7e9fdf5243a9638198a626d9a7a0 100644 (file)
@@ -139,7 +139,7 @@ export class Search extends React.PureComponent<Props, State> {
   };
 
   renderQualifierOption = (option: LabelValueSelectOption) => (
-    <div>
+    <div className="display-flex-center">
       <QualifierIcon className="little-spacer-right" qualifier={option.value} />
       {option.label}
     </div>
@@ -162,6 +162,7 @@ export class Search extends React.PureComponent<Props, State> {
           SingleValue: this.singleValueRenderer,
         }}
         options={this.getQualifierOptions()}
+        aria-label={translate('projects_management.filter_by_component')}
         value={options.find((option) => option.value === this.props.qualifiers)}
       />
     );
@@ -181,6 +182,7 @@ export class Search extends React.PureComponent<Props, State> {
         onChange={this.handleVisibilityChange}
         options={options}
         isSearchable={false}
+        aria-label={translate('projects_management.filter_by_visibility')}
         value={options.find((option) => option.value === (this.props.visibility || 'all'))}
       />
     );
index 5e41b9c325f7ee1d647406b896a2c80afaba1b87..e505f08023c33c33473bfcd73238213473b068fd 100644 (file)
@@ -45,6 +45,7 @@ exports[`render qualifiers filter 1`] = `
       />
     </div>
     <Select
+      aria-label="projects_management.filter_by_component"
       className="input-medium it__project-qualifier-select"
       components={
         {
@@ -86,6 +87,7 @@ exports[`render qualifiers filter 1`] = `
       placeholder="last_analysis_before"
     />
     <Select
+      aria-label="projects_management.filter_by_visibility"
       className="input-small"
       isDisabled={false}
       isSearchable={false}
@@ -189,6 +191,7 @@ exports[`renders 1`] = `
       placeholder="last_analysis_before"
     />
     <Select
+      aria-label="projects_management.filter_by_visibility"
       className="input-small"
       isDisabled={false}
       isSearchable={false}
@@ -278,7 +281,9 @@ exports[`renders optionrenderer and singlevaluerenderer: option renderer 1`] = `
     }
   }
 >
-  <div>
+  <div
+    className="display-flex-center"
+  >
     <QualifierIcon
       className="little-spacer-right"
       qualifier="val"
@@ -297,7 +302,9 @@ exports[`renders optionrenderer and singlevaluerenderer: single value renderer 1
     }
   }
 >
-  <div>
+  <div
+    className="display-flex-center"
+  >
     <QualifierIcon
       className="little-spacer-right"
       qualifier="val"
index b230e837f8cb6dd29f7ae0e259e8369a33e980d8..a92f62d0183d314861dbbf9592bdc9faddf6ba97 100644 (file)
@@ -1643,6 +1643,8 @@ projects_management.delete_all_warning=You're about to delete all {0} items.
 projects_management.project_has_been_successfully_created=Project {project} has been successfully created.
 projects_management.select_project=Select project {0}
 projects_management.show_actions_for_x=Show actions for project {0} 
+projects_management.filter_by_component=Filter by component
+projects_management.filter_by_visibility=Filter by visibility
 
 #------------------------------------------------------------------------------
 #