Element: ariaColIndex property

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.

The ariaColIndex property of the Element interface reflects the value of the aria-colindex attribute, which defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.

Value

A string which contains an integer.

Examples

In this example the aria-colindex attribute on the element with an ID of role-heading is set to "1". Using ariaColIndex we update the value to "2".

html
Semantic Elements to use instead of ARIA's roles
ARIA Role Semantic Element
header h1
header h6
rowgroup thead
term dt
js
let el = document.getElementById("role-heading");
console.log(el.ariaColIndex); // 1
el.ariaColIndex = "2";
console.log(el.ariaColIndex); // 2

Specifications

Specification
Accessible Rich Internet Applications (WAI-ARIA)
# dom-ariamixin-ariacolindex

Browser compatibility

See also