aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstanislavh <stanislav.honcharov@sonarsource.com>2023-01-13 09:20:49 +0100
committersonartech <sonartech@sonarsource.com>2023-01-16 20:03:43 +0000
commit314b5fbc6337e7a3a94eb66cda9fc0104441e2e2 (patch)
tree058ccdd48272636f24186406c025c4a13b2888b0
parent33e2501f9cdb705ed85d3add8b439f87fc7c1476 (diff)
downloadsonarqube-314b5fbc6337e7a3a94eb66cda9fc0104441e2e2.tar.gz
sonarqube-314b5fbc6337e7a3a94eb66cda9fc0104441e2e2.zip
SONAR-18141 Status message is not automatically announced
-rw-r--r--server/sonar-web/src/main/js/components/controls/SearchBox.tsx10
-rw-r--r--server/sonar-web/src/main/js/components/controls/__tests__/__snapshots__/SearchBox-test.tsx.snap4
2 files changed, 9 insertions, 5 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 0de8c213ba1..3c5b8430a61 100644
--- a/server/sonar-web/src/main/js/components/controls/SearchBox.tsx
+++ b/server/sonar-web/src/main/js/components/controls/SearchBox.tsx
@@ -171,11 +171,11 @@ export default class SearchBox extends React.PureComponent<Props, State> {
/>
)}
- {tooShort && minLength !== undefined && (
- <span aria-live="assertive" className="search-box-note">
- {translateWithParameters('select2.tooShort', minLength)}
- </span>
- )}
+ <span aria-live="polite" className="search-box-note">
+ {tooShort &&
+ minLength !== undefined &&
+ translateWithParameters('select2.tooShort', minLength)}
+ </span>
</div>
);
}
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 caaaf8bce89..95e8fea7598 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
@@ -33,5 +33,9 @@ exports[`renders 1`] = `
}
onClick={[Function]}
/>
+ <span
+ aria-live="polite"
+ className="search-box-note"
+ />
</div>
`;