aboutsummaryrefslogtreecommitdiffstats
path: root/demos/autocomplete
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-05-15 14:07:35 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-05-16 11:55:12 +0200
commitf4b2d7a4115814b64ff291e3518fe15f2dfbe390 (patch)
tree15cf5f2edc99e614b32007e7dca2af3fcb78a1cf /demos/autocomplete
parentc0f6b0ccdf69c705a03e30778ae318e0cd8a0625 (diff)
downloadjquery-ui-f4b2d7a4115814b64ff291e3518fe15f2dfbe390.tar.gz
jquery-ui-f4b2d7a4115814b64ff291e3518fe15f2dfbe390.zip
Autocomplete: ARIA live region as extension, adding a messages option. Fixes #7840 - Autocomplete: popup results not read by screen-readers
Diffstat (limited to 'demos/autocomplete')
-rw-r--r--demos/autocomplete/multiple-remote.html3
-rw-r--r--demos/autocomplete/multiple.html5
2 files changed, 5 insertions, 3 deletions
diff --git a/demos/autocomplete/multiple-remote.html b/demos/autocomplete/multiple-remote.html
index 378e449d5..00d739967 100644
--- a/demos/autocomplete/multiple-remote.html
+++ b/demos/autocomplete/multiple-remote.html
@@ -47,7 +47,8 @@
}
},
focus: function() {
- // prevent value inserted on focus
+ // prevent value inserted on focus, update liveRegion instead
+ $( this ).data( "autocomplete" ).liveRegion.text( ui.item.label );
return false;
},
select: function( event, ui ) {
diff --git a/demos/autocomplete/multiple.html b/demos/autocomplete/multiple.html
index e3f84b65d..3d1326591 100644
--- a/demos/autocomplete/multiple.html
+++ b/demos/autocomplete/multiple.html
@@ -59,8 +59,9 @@
response( $.ui.autocomplete.filter(
availableTags, extractLast( request.term ) ) );
},
- focus: function() {
- // prevent value inserted on focus
+ focus: function( event, ui ) {
+ // prevent value inserted on focus, update liveRegion instead
+ $( this ).data( "autocomplete" ).liveRegion.text( ui.item.label );
return false;
},
select: function( event, ui ) {