Element: thuộc tính ariaRowSpan
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 ariaRowSpan của giao diện Element phản ánh giá trị của thuộc tính aria-rowspan, định nghĩa số hàng mà một ô hoặc gridcell kéo dài trong bảng, grid hoặc treegrid.
Giá trị
Một chuỗi chứa một số nguyên.
Ví dụ
Trong ví dụ này, thuộc tính aria-rowspan trên phần tử có ID là spanning-heading được đặt là "3". Sử dụng ariaRowSpan, chúng ta cập nhật giá trị thành "2".
html
<table>
<thead>
<tr>
<th id="spanning-heading" rowspan="3" aria-rowspan="3">
Spanning heading
</th>
<th>Heading</th>
</tr>
</thead>
<tbody>
<tr>
<td>One</td>
</tr>
<tr>
<td>Two</td>
</tr>
</tbody>
</table>
js
let el = document.getElementById("spanning-heading");
console.log(el.ariaRowSpan);
el.ariaRowSpan = "2";
console.log(el.ariaRowSpan);
Đặc tả kỹ thuật
| Specification |
|---|
| Accessible Rich Internet Applications (WAI-ARIA)> # dom-ariamixin-ariarowspan> |