jquery/jquery-ui — pull request #931 by jzaefferer (2013-03-07 23:42:37+00:00)
Title: Selectmenu: Tweak ARIA impplementation

Goals: Have the screenreader read the current value, the label and the role on focus. Have it read the selected value when it changes.

Achieved by: Using an initial aria-labelledby pointing at the button itself and the label. Make the button a live region and change the labelledby when the selection changes. Restore the original labelling on blur to get the correct description the next time the button is focused.

Side notes: Updating aria-selected caused NVDA/Firefox to announce "not selected" when changing selection with the open menu. Without it, it instead announces the items as proper menu items (x of n), that's much better.

TODOs: Not sure if removing the menu's labelledby was actually necessary. Though since menu doesn't receive focus, its likely that none of the menu aria changes are necessary. In fact they should probably just be removed.

Tested with: VoiceOver/Safari, NVDA/Firefox, JAWS/IE9. The first two are really solid, JAWS is good enough. Forgot what part it skipped, but we aren't done here anyway.