]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10679 Add associated labels to the global search
authorStas Vilchik <stas.vilchik@sonarsource.com>
Thu, 23 Aug 2018 15:07:37 +0000 (17:07 +0200)
committerSonarTech <sonartech@sonarsource.com>
Mon, 27 Aug 2018 18:21:57 +0000 (20:21 +0200)
server/sonar-web/src/main/js/apps/groups/components/__tests__/__snapshots__/EditMembers-test.tsx.snap
server/sonar-web/src/main/js/components/controls/SearchBox.tsx
server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap

index 3e3b73245bb91b433066db38fc91c9cd2782d0b1..47c450279d04c05af32db6bb6faa0ecfe5fe37fb 100644 (file)
@@ -365,6 +365,7 @@ exports[`should edit members 2`] = `
                             className="search-box"
                           >
                             <input
+                              aria-label="search_verb"
                               autoComplete="off"
                               autoFocus={true}
                               className="search-box-input"
index 09b7c0a8074c20d59b7f6c5170f490fbdb068da5..c06acd36ce3fa1d34c6d96c755b16cc201b186a0 100644 (file)
@@ -25,14 +25,14 @@ import SearchIcon from '../icons-components/SearchIcon';
 import DeferredSpinner from '../common/DeferredSpinner';
 import { ButtonIcon } from '../ui/buttons';
 import * as theme from '../../app/theme';
-import { translateWithParameters } from '../../helpers/l10n';
+import { translateWithParameters, translate } from '../../helpers/l10n';
 import './SearchBox.css';
 
 interface Props {
   autoFocus?: boolean;
   className?: string;
-  innerRef?: (node: HTMLInputElement | null) => void;
   id?: string;
+  innerRef?: (node: HTMLInputElement | null) => void;
   loading?: boolean;
   minLength?: number;
   onChange: (value: string) => void;
@@ -133,6 +133,7 @@ export default class SearchBox extends React.PureComponent<Props, State> {
     return (
       <div className={classNames('search-box', this.props.className)} id={this.props.id}>
         <input
+          aria-label={translate('search_verb')}
           autoComplete="off"
           autoFocus={this.props.autoFocus}
           className={inputClassName}
index 25b226be5a2b163f69756a2f9c0d402dddcaaa6a..aeddfd7253c39db723460c7fe05744ba99d43623 100644 (file)
@@ -5,6 +5,7 @@ exports[`renders 1`] = `
   className="search-box"
 >
   <input
+    aria-label="search_verb"
     autoComplete="off"
     className="search-box-input"
     maxLength={100}