簡體   English   中英

詠嘆調活着,繁忙的詠嘆調​​,擴大的詠嘆調和控制詠嘆調的規則是什么?

[英]What are the rules between aria-live, aria-busy, aria-expanded and aria-controls?

在以下非常簡單的情況下,我不確定是否要尊重不同aria屬性的所有相互依賴關系:切換某些區域可見性的按鈕,但此類區域也必須首先填充。

首次點擊之前:

<div aria-live="polite">
    <button>Toggle details</button>
</div>

首次單擊后,正在加載數據:

<div aria-live="polite" aria-busy="true">
    <button aria-controls="details" aria-expanded="false">Toggle details</button>
    <div id="details"></div>
</div>

加載數據后:

<div aria-live="polite" aria-busy="false">
    <button aria-controls="details" aria-expanded="true">Toggle details</button>
    <div id="details">Some data</div>
</div>

第二次點擊后

<div aria-live="polite" aria-busy="false">
    <button aria-controls="details" aria-expanded="false">Toggle details</button>
    <div id="details" style="display: none;">Some data</div>
</div>

等等。

這個對嗎? aria-live是否在單獨的(父)標簽上而不是實際代表可隱藏面板的標簽上正確嗎?

通常,ARIA活動區域應僅存在於具有簡單文本塊的容器上。 一個有生命的區域會說出它的全部內容(禁止使用aria-atomic ),並且此控制可能太復雜而無法很好地適應。

您的披露按鈕很好(對於此簡化方案)。

與應用ARIA(或者坦率地說,是大多數可用性問題)時通常一樣,要使用的特定代碼取決於上下文。

如果您有一個特定的示例,則測試起來會容易得多。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM