For code review, to eventually merge into the selectmenu branch. I've pushed the individual commits for now, we can squash that into one later.
There are currently a few tests failing - I haven't updated those yet.
I've tested with JAWS and NVDA under Windows and VoiceOver under OSX.
Feature wise this is probably as good as it gets, for now anyway. We can still improve later, but this is already much better then what we had.
Once the code is reviewed I'll sqaush and fix the unit tests.
Selectmenu: Use button element instead of anchor, makes click-on-labe…
…l work. Add aria-live to announce changes in JAWS/Firefox while menu is closed. Remove aria-labelledby as the label element is now the label. Still terrible in IE9/JAWS, way better with Safari/VoiceOver.
Selectmenu: Remove aria-expanded updates, not being useful at all. Re…
…move labelledby on menu to avoid double announcement. Remove aria-activedescdent updates on button, as that breaks in IE.
Selectmenu: Restore label-click handler to move focus to button witho…
…ut opening the menu
Selectmenu: Trigger screenreaders to read button's value on focus by …
…appending empty content to live region
@fnagel could you test this?
I'm not quite sure how this is possible but I've tested on Win7 with NVDA 2012.2.1 and JAWS 14.0.1102 :
These are my test results from latest selectmenu branch:
I did some testing as well.
Did you test FF / IE and NVDA on native Windows machine?
For testing JAWS, you can download free demos here: http://www.freedomscientific.com/products/fs/jaws-product-page.asp
Would be good if you could also compare this branch to the selectmenu branch, since my and Felix' results differed so heavily.
Btw. I tested in VirtualBox VM on Windows 7.
I've tested FF + NVDA on another Win7 machine (and latest NVDA 2012.3.1) and the keyboard control is definitely broken when the menu is open.
@fnagel Hmm, I'll check my NVDA version next time I switch to Windows. I'm running Win7 on my MBP via Bootcamp
OK, got a chance to do more testing. I have the latest NVDA but I noticed that my previous tests must have been on the selectmenu branch not the selectmenu-aria-tweaks branch. Below are my results for the tweaks branch:
NVDA/FF - Seems to work OK. Keyboard worked fine but couldn't open the menu with spacebar.
NVDA/IE9 - Broken. Keyboard left/right can rotate through the values properly but up/down does some crazy jumping and multiple value reads before losing focus and then have to tab back to the selectmenu. The 3rd selectmenu in the default selectmenu demo seems to work ok but it reads the values twice.
Mhh, so both branches do work partly but far from perfect. What now?
Shall I merge tweaks into selectmenu and we test again?
Replaced by #931