Skip to main content
HTML Validation

Bad value “0” for attribute “aria-rowspan” on element “div”: Zero is not a positive integer.

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 like gridcell or rowheader within roles that imply grid-like structures, such as grid or treegrid.

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 role attribute is correctly associated with an element that can logically have a row and grid structure, such as gridcell.
  • Ensure that the aria-rowspan value 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

Was this guide helpful?

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Ready to validate your sites?
Start your free trial today.