Adding accessibility to chosen:

- Added unique_id which is used for ARIA attribtues
  that require an ID. So now search_field and
  search_results have an ID
- Added the required ARIA tags for chosen to behave
  like a combobox
- Tested with Mac OSX Chrome 36 using VoiceOver,
  now the screen reader is able to read the values
  in the chosen select box, like it's a SELECT
  element

NOTE:
This is bascially what [jQueryUI Selectmenu](http://jqueryui.com/selectmenu/) does
related to #2013 
For jQuery the right way is to use booleans, since it knows to put in
attribute 'disabled'
The value 'disabled' when you pass it true.
In prototype I'm not sure what is the way to go.

From:  Christophe Coevoet <notifications@github.com>
Reply-To:  harvesthq/chosen
<reply+p-16468062-d3d200ff91b8cfa002ea8de44396a9a729abad1b-512336@reply.gith
ub.com>
Date:  Wed, 20 Aug 2014 03:17:44 -0700
To:  harvesthq/chosen <chosen@noreply.github.com>
Cc:  itay adler <itayadler@gmail.com>
Subject:  Re: [chosen] Adding accessibility to chosen: (#2047)


In coffee/chosen.proto.coffee:
> @@ -224,6 +235,7 @@ class @Chosen extends AbstractChosen
>        return false
>  
>      @container.addClassName "chosen-with-drop"
> +    @search_field.writeAttribute("aria-expanded", true)
you are using booleans here and on line 255 while you use the string 'false'
on line 42. What is the right way ?

‹
Reply to this email directly or view it on GitHub
<https://github.com/harvesthq/chosen/pull/2047/files#r16468062> .