]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-18141 Status message is not automatically announced
authorstanislavh <stanislav.honcharov@sonarsource.com>
Fri, 13 Jan 2023 08:20:49 +0000 (09:20 +0100)
committersonartech <sonartech@sonarsource.com>
Mon, 16 Jan 2023 20:03:43 +0000 (20:03 +0000)
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 0de8c213ba18c22da149f8f24dc18301d5deb5f4..3c5b8430a61e5b75fa7837b0d223f82c254d559c 100644 (file)
@@ -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>
     );
   }
index caaaf8bce8940442871b303e456d77eef19dead7..95e8fea7598c9c1db701edf81524a206b1f6cda7 100644 (file)
@@ -33,5 +33,9 @@ exports[`renders 1`] = `
     }
     onClick={[Function]}
   />
+  <span
+    aria-live="polite"
+    className="search-box-note"
+  />
 </div>
 `;