aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/autocomplete
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2013-10-18 15:39:20 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2013-10-19 00:27:51 +0200
commit7b9c810b9ac450d826b6fa0c3d35377178b7e3b3 (patch)
tree9daf1282e4142efcb94fb94415839cb1e2851cb5 /tests/unit/autocomplete
parentb99f8258bf5e8c427cb7c0046fa5ceaa68871eef (diff)
downloadjquery-ui-7b9c810b9ac450d826b6fa0c3d35377178b7e3b3.tar.gz
jquery-ui-7b9c810b9ac450d826b6fa0c3d35377178b7e3b3.zip
Autocomplete: Append liveRegion to body to support detached init. Fixes #9590 - Dynamically adding input field breaks auto-complete's accessibility for screen readers
Diffstat (limited to 'tests/unit/autocomplete')
-rw-r--r--tests/unit/autocomplete/autocomplete_core.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js
index a8b0a7330..58e96755a 100644
--- a/tests/unit/autocomplete/autocomplete_core.js
+++ b/tests/unit/autocomplete/autocomplete_core.js
@@ -257,6 +257,15 @@ test( "ARIA", function() {
"Live region for multiple values" );
});
+test( "ARIA, init on detached input", function() {
+ expect( 1 );
+ var element = $( "<input>" ).autocomplete({
+ source: [ "java", "javascript" ]
+ }),
+ liveRegion = element.autocomplete( "instance" ).liveRegion;
+ equal( liveRegion.parent().length, 1, "liveRegion must have a parent" );
+});
+
test( ".replaceWith() (#9172)", function() {
expect( 1 );