Element.ariaRowSpan is an instance property that reflects the aria-rowspan attribute. Learn how it declares how many rows a cell or gridcell spans, how it relates to HTML rowspan and ariaRowIndex, and how to get or set it from JavaScript—with five examples and try-it labs.
01
Kind
Instance property
02
Type
String (integer)
03
Meaning
Rows spanned
04
Reflects
aria-rowspan
05
Status
Baseline widely
06
Used on
Cell / gridcell
Fundamentals
Introduction
Some table cells stretch across more than one row—like a category label that sits beside several data rows. Assistive technologies need that height as part of the grid model.
aria-rowspan declares the span count. The DOM property ariaRowSpan lets you read and update it from JavaScript.
JavaScript
const el = document.getElementById("spanning-heading");
console.log(el.ariaRowSpan); // "3"
el.ariaRowSpan = "2";
💡
Beginner tip
On a native HTML table, prefer the HTML rowspan attribute for layout. Use ariaRowSpan for ARIA grids / treegrids, or when you need the reflected ARIA value in script.
Concept
Understanding the Property
MDN: the ariaRowSpan property of the Element interface reflects the value of the aria-rowspan attribute, which defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
Reflected attribute — mirrors aria-rowspan.
Get / set — readable and writable string integer.
Span height — how many rows the cell covers.
Baseline — widely available since October 2023 (MDN).
Foundation
📝 Syntax
JavaScript
ariaRowSpan
Value
A string which contains an integer (the number of rows spanned).
Item
Detail
Type
string containing an integer (e.g. "3")
Reflects
aria-rowspan
Applies to
cell / gridcell (table, grid, treegrid)
HTML cousin
rowspan on <td> / <th>
Pattern
📋 Spanning Heading (MDN Shape)
MDN starts with a heading spanning 3 rows, then updates ariaRowSpan to "2":
Assigning the property updates the reflected aria-rowspan attribute. For native layout, also keep HTML rowspan in sync if you rely on it for rendering.
📈 Index Pair, Attribute Sync & Snapshot
Practice pairing with row index and verify reflection.
Example 3 — Pair with ariaRowIndex
Declare starting row and how many rows the cell covers.
Prefer ariaRowSpan in script; keep the attribute for HTML markup.
Example 5 — Support Snapshot
Feature-detect and remember HTML rowspan vs ARIA.
JavaScript
console.log({
supported: "ariaRowSpan" in Element.prototype,
tip: "Prefer HTML rowspan for native tables; ariaRowSpan for ARIA grids",
valueType: "string integer",
status: "Baseline Widely available (MDN)"
});
Element.ariaRowSpan is Baseline Widely available (MDN: across browsers since October 2023). Logos use the shared browser-image-sprite.png sprite from this project.
✓ Baseline Widely available
Element.ariaRowSpan
String integer — reflects aria-rowspan (rows spanned by a cell).
BaselineWidely available
Google ChromeSupported (ARIA reflection)
Yes
Microsoft EdgeSupported (ARIA reflection)
Yes
Mozilla FirefoxSupported (ARIA reflection)
Yes
Apple SafariSupported (ARIA reflection)
Yes
OperaFollow Chromium support
Yes
Internet ExplorerNo ariaRowSpan IDL — use setAttribute
No
ariaRowSpanBaseline
Bottom line: Use ariaRowSpan to get/set aria-rowspan. Keep the span aligned with visual layout (HTML rowspan or grid CSS). Pair with ariaRowIndex and ariaRowCount for a complete row model.
Wrap Up
Conclusion
ariaRowSpan reflects aria-rowspan so cells and gridcells can declare how many rows they span. Use string integers, keep visuals in sync, and prefer HTML rowspan for simple native tables when that is enough.
Reflected aria-rowspan string for how many rows a cell covers.
5
Core concepts
📄01
Get / set
on Element
Kind
📝02
String integer
span count
Type
🔍03
Cell / gridcell
table / grid
Use
✅04
Baseline
widely available
Status
🎯05
vs rowspan
HTML for layout
Tip
❓ Frequently Asked Questions
It reflects the aria-rowspan attribute as a string integer that defines how many rows a cell or gridcell spans in a table, grid, or treegrid.
No. MDN marks Element.ariaRowSpan as Baseline Widely available (since October 2023). It is not Deprecated, Experimental, or Non-standard.
A string that contains an integer (for example "2" or "3"), not a Number type.
On a native <td>/<th>, HTML rowspan is the standard way to span rows. aria-rowspan / ariaRowSpan is the ARIA reflection used especially for ARIA grid/treegrid widgets (and can mirror rowspan).
ariaRowCount is the total rows. ariaRowIndex is a cell’s starting row. ariaRowSpan is how many rows that cell covers from that position.
Yes. Reading and writing ariaRowSpan updates the reflected aria-rowspan attribute.
Did you know?
MDN’s demo sets both HTML rowspan="3" and aria-rowspan="3" on the same heading—layout via HTML, ARIA reflection via the attribute/property.