aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/controls
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-08-23 17:07:37 +0200
committerSonarTech <sonartech@sonarsource.com>2018-08-27 20:21:57 +0200
commit76c379bdbe1ddc932a6bc80eeb9e3ead5e8107dd (patch)
treed5eb33177656938a4df21478e3abe47a74a2d907 /server/sonar-web/src/main/js/components/controls
parent1303c4562196a5f34348c3884d3a9580c58b49a3 (diff)
downloadsonarqube-76c379bdbe1ddc932a6bc80eeb9e3ead5e8107dd.tar.gz
sonarqube-76c379bdbe1ddc932a6bc80eeb9e3ead5e8107dd.zip
SONAR-10679 Add associated labels to the global search
Diffstat (limited to 'server/sonar-web/src/main/js/components/controls')
-rw-r--r--server/sonar-web/src/main/js/components/controls/SearchBox.tsx5
-rw-r--r--server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap1
2 files changed, 4 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/components/controls/SearchBox.tsx b/server/sonar-web/src/main/js/components/controls/SearchBox.tsx
index 09b7c0a8074..c06acd36ce3 100644
--- a/server/sonar-web/src/main/js/components/controls/SearchBox.tsx
+++ b/server/sonar-web/src/main/js/components/controls/SearchBox.tsx
@@ -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}
diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap
index 25b226be5a2..aeddfd7253c 100644
--- a/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap
+++ b/server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap
@@ -5,6 +5,7 @@ exports[`renders 1`] = `
className="search-box"
>
<input
+ aria-label="search_verb"
autoComplete="off"
className="search-box-input"
maxLength={100}