課程
/前端開發
/Bootstrap
/玩轉Bootstrap(基礎)
我看了幾個使用bootstrap框架的網站源碼基本沒有這兩類屬性的。
2016-12-05
源自:玩轉Bootstrap(基礎) 1-1
正在回答
有4個是輸出換行標簽謝謝鼓勵。
HTML5 aria-* and role
在bootstrap中看到role和aria-*,不知道干嘛的。google一下,發現aria的意思是Accessible Rich Internet Application。 Accessible一般是為不方便的人士提供的功能,比如windows的放大鏡,語音朗讀,高對比度主題等。
?
HTML5針對html tag增加的屬性:role 和 aria-*。
role的作用是描述一個非標準的tag的實際作用。比如用div做button,那么設置div 的 role=“button”,輔助工具就可以認出這實際上是個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-*的作用就是描述這個tag在可視化的情境中的具體信息。比如,
<div role="checkbox" aria-checked="checked"></div>
輔助工具就會知道,這個div實際上是個checkbox的角色,為選中狀態。
苦瓜ts 提問者
舉報
告訴你使用Bootstrap,并且能夠獨立定制出適合自己的Bootstrap
3 回答是否可以省略某些屬性
2 回答role屬性
1 回答aria-labelledby屬性
1 回答role屬性的用法
4 回答這個form 中的role 屬性 是想表達 什么意思?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2022-03-24
有4個是輸出換行標簽謝謝鼓勵。
2016-12-05
HTML5 aria-* and role
在bootstrap中看到role和aria-*,不知道干嘛的。google一下,發現aria的意思是Accessible Rich Internet Application。 Accessible一般是為不方便的人士提供的功能,比如windows的放大鏡,語音朗讀,高對比度主題等。
?
HTML5針對html tag增加的屬性:role 和 aria-*。
?
role的作用是描述一個非標準的tag的實際作用。比如用div做button,那么設置div 的 role=“button”,輔助工具就可以認出這實際上是個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-*的作用就是描述這個tag在可視化的情境中的具體信息。比如,
<div role="checkbox" aria-checked="checked"></div>
輔助工具就會知道,這個div實際上是個checkbox的角色,為選中狀態。