Favorites

HTML aria-colcount ARIA Attribute

aria-colcount
ARIA AttributeThis ARIA attribute is supported by all modern browsers.
Updated 28th November 2026

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.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

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

Type
Widget
Value
integer
Default
None
Used with
grid, table, treegrid

Syntax

<element role="grid" aria-colcount="number">

Values

  • integerThe total number of columns, or -1 if the total is unknown.

Example

<div role="grid" aria-colcount="12" aria-label="Sales by month">
<div role="row">
<span role="columnheader" aria-colindex="5">May</span>
<span role="columnheader" aria-colindex="6">June</span>
</div>
<div role="row">
<span role="gridcell" aria-colindex="5">$1,200</span>
<span role="gridcell" aria-colindex="6">$1,450</span>
</div>
</div>

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.

This ARIA attribute is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee