aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorDylan Barrell <dylan@barrell.com>2013-12-22 11:36:43 -0500
committerJörn Zaefferer <joern.zaefferer@gmail.com>2014-01-14 11:09:49 +0100
commit0b28d597fe1857590c9719c8b41f00e77967f7d7 (patch)
tree0cb11a3b5469af8222729742926726e30a25a9a5 /demos
parent6ec452cc63313ec03f58942ce896036c7a2fcf3f (diff)
downloadjquery-ui-0b28d597fe1857590c9719c8b41f00e77967f7d7.tar.gz
jquery-ui-0b28d597fe1857590c9719c8b41f00e77967f7d7.zip
Autocomplete: Announce autocomplete correctly in all ATs.
Fixes #9631 Closes gh-1153
Diffstat (limited to 'demos')
-rw-r--r--demos/autocomplete/categories.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/demos/autocomplete/categories.html b/demos/autocomplete/categories.html
index 3c436efbd..998ae9ea6 100644
--- a/demos/autocomplete/categories.html
+++ b/demos/autocomplete/categories.html
@@ -29,11 +29,15 @@
var that = this,
currentCategory = "";
$.each( items, function( index, item ) {
+ var li;
if ( item.category != currentCategory ) {
ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
currentCategory = item.category;
}
- that._renderItemData( ul, item );
+ li = that._renderItemData( ul, item );
+ if ( item.category ) {
+ li.attr( "aria-label", item.category + " : " + item.label );
+ }
});
}
});