About This HTML Issue
According to the ARIA specification, the attribute aria-rowspan is expected to have a positive integer value. A positive integer is a whole number greater than zero.
Explanation
-
aria-rowspan: This attribute is used in ARIA-enabled tables to indicate how many rows a cell should span within its row group. It is often used in elements likegridcellorrowheaderwithin roles that imply grid-like structures, such asgridortreegrid.
Example of Incorrect Usage
<div role="gridcell" aria-rowspan="0">Content</div>
In this example, aria-rowspan is set to "0", which is not a valid positive integer.
Correct Usage
To resolve the issue, you should specify a positive integer. For example, if the cell should span one row, you can write:
<div role="gridcell" aria-rowspan="1">Content</div>
If the cell should span multiple rows, adjust the number accordingly:
<div role="gridcell" aria-rowspan="2">Content</div>
Considerations
-
Make sure the
roleattribute is correctly associated with an element that can logically have arowandgridstructure, such asgridcell. -
Ensure that the
aria-rowspanvalue aligns with the structure of your grid or table, representing the actual number of rows that the element is spanning.
Learn more:
Last reviewed: March 31, 2025
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.