Is there a standard way to provide alt=“” text for screen-readers on HTML5 ads / animations?

人盡茶涼 提交于 2019-12-04 14:19:15

If you create a live region with aria-live like this,

<div role="region" id="announce" aria-live="polite">

And update the content inside with a JavaScript on the right time, screen reader will announce the content whenever it gets updated.

Here's more information on live region.

https://www.w3.org/TR/2008/WD-wai-aria-practices-20080204/#LiveRegions

If you want to hide the content for sited users, you can use this technique.

https://webaim.org/techniques/css/invisiblecontent/

Maybe you can also create a button to turn on/off the announcement, so screen reader users can choose if they want to hear the description in real time or not.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!