Skip to main content
WCAGrules
Quick navigation

ARIA property

aria-rowspan

How many rows a cell spans, when the markup cannot say so.

It stretches a cell down over the rows below it, so a header covers the range it visually covers. Change the number and the reach changes with it.

Which roles may carry aria-rowspan

Value
integer
Filed as
A property, which is how ARIA files it and not a rule about how often it changes.
Roles that may carry it
cell
Roles that inherit it
columnheader, rowheader

Those lists are not advice. Browsers are required to ignore a non-global attribute sitting on a role that does not support it, so aria-rowspan on the wrong element is not weak, it is absent. You can read it in the DOM and nobody using a screen reader can.

Every role above comes from the specification's own list for this attribute, checked name for name. The normative definition stays with the W3C, in the aria-rowspan section of the ARIA specification.

Keeping aria-rowspan true

Two things separate this from aria-colspan. Zero is legal here, and it means the cell runs to the end of its row group, which is useful and easy to write by accident. And as with colspan, where the host language has its own attribute for this, browsers are required to ignore the ARIA one and expose the host language's value, so in an HTML table with a real rowspan this is dead weight that can still drift out of step with what people see.

How aria-rowspan gets checked

There are test rules that check an ARIA attribute is one that exists, is allowed on the role underneath it, and carries a value of the right type. What they map to is ARIA's own author requirements rather than any WCAG criterion, so a misplaced attribute breaks ARIA without being a WCAG failure by itself. It becomes one under 4.1.2 Name, Role, Value the moment the missing or wrong value means the control's state cannot be worked out programmatically, which is what usually happens next.

Nothing automated catches the failure this page is about. A stale value is a valid value, on a permitted role, with the right type. It is only wrong about the world.

Attributes you will meet alongside aria-rowspan

  • aria-colindex Which column a cell is in, counting from the real table rather than what is shown.
  • aria-colspan How many columns a cell spans, when the markup cannot say so itself.
  • aria-rowindex Which row this is, counting from the real table.

Every ARIA state and property · Every ARIA role · ARIA explained

Go somewhere useful

Find tools, resources and your workspace.

29 destinations