aria-details
全域性 aria-details 屬性標識提供與物件相關附加資訊的元素(或元素)。
描述
aria-details 屬性可用於為物件提供其他資訊或複雜描述。它用於透過提供更深入的資訊來告知輔助技術使用者有關內容的資訊,無論該內容是在當前文件中還是指向其他資產的連結。
還有其他 HTML 和 WAI-ARIA 屬性具有類似的目的。HTML <label> 元素以及 aria-label 和 aria-labelledby 屬性用於為物件提供簡短標籤。HTML title 屬性以及 aria-description 和 aria-describedby 屬性提供了物件的更長純文字描述。但是,當需要並提供與物件相關的其他資訊、複雜描述或可導航內容時,應使用 aria-details 屬性。
aria-details 屬性的作用類似於 HTML 從未完全支援的 longdesc 屬性(替換元素內容的長描述的 URL),由於缺乏支援和濫用而被棄用。
aria-details 屬性採用 id 或以空格分隔的 id 列表作為其值,以獲取更詳細的資訊。當在元素上包含 aria-details 時,輔助技術會告知使用者擴充套件資訊可用,使使用者能夠導航到引用的內容。
aria-details 引用的元素旨在包含比通常透過 aria-describedby 提供的更多資訊。
aria-details 引用的元素應對所有使用者可見。aria-details 會通知可能無法掃描螢幕並快速識別說明性內容可用的使用者。
注意:aria-details 對可訪問描述沒有影響。
與 aria-describedby 不同,aria-details 引用的元素不用於可訪問描述,並且在呈現給輔助技術使用者時不會轉換為簡單的字串。如果關聯的內容不太長,並且將引用的元素的內容展平為簡單的文字字串不會導致資訊丟失,請考慮改用 aria-describedby。也就是說,元素同時具有 aria-details 和使用 aria-describedby 或 aria-description 指定的描述是有效的。
示例
在定義和術語角色方面,aria-details 將包含在具有 definition 角色的元素的 id 的 term 元素上。
<p>The <strong>cubic-bezier()<strong> functional notation defines a cubic
<span role="term" aria-details="bezier bezImg">Bézier curve</span>. As
these curves are continuous, they are often used to smooth down the start and
end of the curve and are therefore sometimes called easing functions.
</p>
<p role="definition" id="bezier">A <strong>Bézier curve</strong>,
(Pronounced \ ˈbe-zē-ˌā \)
<i aria-description="English pronunciation">BEH-zee-ay</i>) is a mathematically
described curve used in computer graphics and animation. The curve is defined
by a set of control points with a minimum of two. Web related graphics
and animations use Cubic Béziers, which are curves with four control
points P<sub>0</sub>, P<sub>1</sub>, P<sub>2</sub>, and P<sub>3</sub>.
</p>
<a href="bezierExplanation.html" id="bezImg"
aria-label="Explanation of Bézier curve in CSS easing functions">
<img alt="Animated Bézier curve showing 4 control points." src="bezier.gif">
</a>
值
- ID 參考列表
-
提供或連結到其他相關資訊的元素的
id或以空格分隔的 id 列表。
關聯角色
用於**所有**角色。
規範
| 規範 |
|---|
| 可訪問的富網際網路應用程式 (WAI-ARIA) # aria-details |
另請參閱
- HTML id 屬性
aria-labelledbyaria-describedbyaria-description- 影像
alt屬性 - HTML title 屬性