From 0b28d597fe1857590c9719c8b41f00e77967f7d7 Mon Sep 17 00:00:00 2001 From: Dylan Barrell Date: Sun, 22 Dec 2013 11:36:43 -0500 Subject: Autocomplete: Announce autocomplete correctly in all ATs. Fixes #9631 Closes gh-1153 --- demos/autocomplete/categories.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'demos') 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( "
  • " + item.category + "
  • " ); currentCategory = item.category; } - that._renderItemData( ul, item ); + li = that._renderItemData( ul, item ); + if ( item.category ) { + li.attr( "aria-label", item.category + " : " + item.label ); + } }); } }); -- cgit v1.2.3