ARIA States & Properties
aria-colcount
Reports the total number of columns in a table or grid when some columns are absent from the DOM. Use -1 if the total is unknown. Supply consistent column indices for the rendered subset. Value type: integer. Accepted values: positive integer or -1. Default or omitted behavior: inferred from available columns. Applicable context: table, grid, treegrid. Use only where allowed for the element’s implicit or explicit role. ARIA describes accessibility semantics; it does not automatically implement the associated behavior. Test with the relevant browser and assistive technology.
Formal Syntax & Structure
html syntaxhtml
aria-colcount="5"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| aria-colcount | integer | Accepted values: positive integer or -1. Default or omitted behavior: inferred from available columns. Context: table, grid, treegrid. Requiredness depends on the role. |
Working Example
Example Snippethtml
<div role="table" aria-label="Inventory" aria-colcount="5"> <div role="row"> <span role="cell" aria-colindex="3">Pens</span> </div></div>