Ember.js and accessibility
Hey everyone! I made a video today about Ember.js and accessibility. I had always been repeating what Iād heard about screen readers: they canāt work with JavaScript. Turns out thatās not exactly true. The video is the best way to show you:
VoiceOver, Ember.js, and WAI-ARIA from Steve Klabnik on Vimeo.
Hereās a rough transcript, if you donāt want to watch it:
Hey everyone. I recently was checking out Ember.js, and more specifically, Discourse. Discourse is supposed to be a next-generation discussion platform, and itās an Ember app backed by a Rails-based JSON API. I mentioned to Ember co-creator Yehuda Katz that I wished Ember had āa better accessibility storyā. He asked me to elaborate, and I mentioned how my friends on Twitter were saying that Discourse wouldnāt able to be inclusive because JavaScript-heavy apps canāt be used by screenreaders. So he said, āHit ā-F5.ā
Whoah.
Hitting that key combination activates VoiceOver, a feature of OS X I didnāt know existed. Basically, VoiceOver is able to interact with applications and allow keyboard navigation for those who are blind or sight-impaired. Neat! But what about in-browser? Turns out VoiceOver handles JavaScript heavy pages just fine.
I tried it out on http://try.discourse.org/, and it works pretty well! Not perfect, but you can manage. Yehuda also pointed me at WAI-ARIA, which is a W3C initiative. Iāll let the site explain:
WAI-ARIA, the Accessible Rich Internet Applications Suite, defines a way to make Web content and Web applications more accessible to people with disabilities. It especially helps with dynamic content and advanced user interface controls developed with Ajax, HTML, JavaScript, and related technologies.
Neat! Basically, you can add markup to your HTML, and it will help applications like VoiceOver allow people to use your site more easily, even if it uses a lot of Ajax. This is super cool, and for me, mitigates one of my main complaints against using SPAs. Of course, WAI-ARIA isnāt really Emberās job; youāll have to make the HTML be output in the right way yourself. But it makes me really happy to know that people with disabilities donāt need to be left out of the rich-client portion of the web.