HTML aria-rowcount ARIA Attribute
The aria-rowcount attribute gives the total number of rows in a table or grid when only some of the rows are present in the DOM.
Description
The aria-rowcount attribute defines the total number of rows in a table, grid or treegrid. It is only needed when some rows are missing from the DOM, for example in a large data table that uses paging or "virtual scrolling" to render just the visible rows. Screen readers can then announce the real size, such as "table with 500 rows".
Put it on the element with the table, grid or treegrid role, and give each row its position with aria-rowindex. The count includes header rows. Use -1 when the total is not known.
When every row is in the DOM, leave the attribute out and let the browser count them.
Properties
Syntax
<element role="table" aria-rowcount="number">
Values
- integerThe total number of rows, or -1 if the total is unknown.
Example
Browser Support
The following information will show you the current browser support for the aria-rowcount ARIA attribute. Hover over a browser icon to see the version that first introduced support for this ARIA attribute.
Desktop





Tablets & Mobile





