WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Live Chat - ARIA recommendations and/or good examples?

for

From: Bryan Garaventa
Date: Nov 13, 2014 2:38PM


The technique for implementing live chat with custom messages is actually very easy.

All you really need is an offscreen container element at the end of the page that innerHTML can be used to write custom strings to,
and include aria-live='polite' within the offscreen tag.

This automatically works across desktop and mobile.

Live demo:
http://whatsock.com/tsg/Coding%20Arena/Web%20Chat%20and%20Dynamic%20Message%20Announcement/Web%20Chat%20(Static)/demo.htm