ARIA: aria-braillelabel 屬性
全域性 aria-braillelabel 屬性定義了一個字串值,用於標記當前元素,該值旨在轉換為盲文。
描述
全域性 aria-braillelabel 屬性與全域性 aria-label 類似,它定義了一個字串值來標記當前元素。aria-label 由螢幕閱讀器讀取,而 aria-braillelabel 屬性的內容則轉換為盲文;為使用者提供可識別的盲文物件名稱。
aria-braillelabel 屬性的目的是覆蓋輔助技術如何本地化和表達元素的盲文可訪問名稱。只有在沒有此屬性的情況下,當轉換為盲文時,可訪問名稱不是預期的使用者體驗時,才應使用此屬性。
使用 aria-braillelabel 時,請確保:
- 應用
aria-braillelabel的元素具有有效的可訪問名稱。 aria-braillelabel的值包含實際內容,並且在 Unicode 或 Unicode 盲文中不是空的或僅包含空格。- 該值**不**與可訪問名稱相同。
aria-braillelabel的值已本地化,以符合文件語言。- 告知使用者此屬性可用,特別是當內容包含 Unicode 盲文圖案時,以便使用者知道設定以應用使用者特定的盲文翻譯。
注意:支援盲文的輔助技術可以將可訪問名稱轉換為盲文。因此,只有當可訪問名稱不是您想要的使用者體驗時,才使用 aria-braillelabel。
僅使用可訪問名稱(例如,來自內容或透過 aria-label)幾乎總是更好的使用者體驗,因此不要使用 aria-braillelabel 來複制 aria-label。只有當可訪問名稱無法提供足夠的盲文表示時,才使用 aria-braillelabel。
html
<button aria-braillelabel="***">
<img alt="3 out of 5 stars" src="three_stars.png" />
</button>
盲文顯示器可能會以盲文顯示“btn ***”,而不是更冗長的“btn gra 3 out of 5 stars”。
值
<string>-
該值是一個字串,一種無約束的值型別,旨在轉換為盲文。
相關角色
用於 **所有** 角色。
規範
| 規範 |
|---|
| 無障礙富網際網路應用程式 (WAI-ARIA) # aria-braillelabel |