HTML aria-colcount ARIA Attribute
The aria-colcount attribute gives the total number of columns in a table or grid when only some of the columns are present in the DOM.
Description
The aria-colcount attribute defines the total number of columns in a table, grid or treegrid. It is needed only when not all columns are in the DOM, for example in a wide data grid that renders just the columns currently scrolled into view. Without it, assistive technology would count only the columns it can see in the markup.
Use it on the element with the table, grid or treegrid role, and use aria-colindex on the cells to say where each one sits in the full table. If the total is not known, use -1.
When all the columns are present, leave the attribute out: browsers work out the count from the markup.
Properties
Syntax
<element role="grid" aria-colcount="number">
Values
- integerThe total number of columns, or -1 if the total is unknown.
Example
Browser Support
The following information will show you the current browser support for the aria-colcount ARIA attribute. Hover over a browser icon to see the version that first introduced support for this ARIA attribute.
Desktop





Tablets & Mobile





