Add support for Windows 8 Narrator ExpandCollapse pattern

Includes refactoring to make JSLint happier.