|
在video-js的demo中看到了很多aria-*,不知道干嘛的。google一下,發(fā)現(xiàn)aria的意思是Accessible Rich Internet Application。 Accessible一般是為不方便的人士提供的功能,比如windows的放大鏡,語音朗讀,高對(duì)比度主題等。
google到了一個(gè)youtube的視頻,講解的很清楚,有代碼有示例。估計(jì)是Google Developer Day 2011的分享演講。真是個(gè)有責(zé)任感人性化的公司啊! http://www./watch?v=pwm73Pe5xb8 主要內(nèi)容是說明并演示了HTML5針對(duì)html tag增加的屬性:role 和 aria-*。
role的作用是描述一個(gè)非標(biāo)準(zhǔn)的tag的實(shí)際作用。比如用div做button,那么設(shè)置div 的 role=“button”,輔助工具就可以認(rèn)出這實(shí)際上是個(gè)button。 ARIA Roles Use the ARIA role attribute to indicate that a generic tag is playing the role of a standard widget like a button.
而aria-*的作用就是描述這個(gè)tag在可視化的情境中的具體信息。比如, <div role="checkbox" aria-checked="checked"></div> 輔助工具就會(huì)知道,這個(gè)div實(shí)際上是個(gè)checkbox的角色,為選中狀態(tài)。 Add ARIA for screen readers ARIA attributes provides semantic information to screen readers that is normally conveyed visually. Note that using ARIA does not automatically implement the standard widget behavior, you'll still need to add focus management and keyboard navigation yourself. |
|
|