Element: thuộc tính ariaAtomic
Baseline
2023
Newly available
Since October 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Thuộc tính ariaAtomic của giao diện Element phản chiếu giá trị của thuộc tính aria-atomic, cho biết liệu công nghệ hỗ trợ sẽ hiển thị toàn bộ hoặc chỉ các phần của vùng đã thay đổi dựa trên các thông báo thay đổi được định nghĩa bởi thuộc tính aria-relevant.
Giá trị
Một chuỗi với một trong các giá trị sau:
Ví dụ
Trong ví dụ này, thuộc tính aria-atomic trên phần tử có ID "clock" được đặt thành "true". Sử dụng ariaAtomic chúng ta cập nhật giá trị thành "false".
html
<div id="clock" role="timer" aria-live="polite" aria-atomic="true"></div>
js
let el = document.getElementById("clock");
console.log(el.ariaAtomic); // true
el.ariaAtomic = "false";
console.log(el.ariaAtomic); // false
Đặc tả kỹ thuật
| Specification |
|---|
| Accessible Rich Internet Applications (WAI-ARIA)> # dom-ariamixin-ariaatomic> |