Repository navigation
Description
Named Row Groups for Tables and Grids
Introduction
Tables and grids frequently organize rows into visually labeled groups.
For example, an employee grid may group employees by department:
Name Status Location
─────────────────────────────────
Engineering
Alice Active Seattle
Charlie Active London
Marketing
Eve Active Toronto
Frank Active Chicago
A sighted user can perceive that Alice and Charlie belong to the Engineering group and that Eve and Frank belong to the Marketing group.
HTML and ARIA can represent the rows, cells, and the structural grouping of those rows, but there is currently no interoperable way to associate the visible group caption with the corresponding row group and communicate that relationship to assistive technology.
Authors typically represent the group caption as another row containing a cell that spans all columns:
<table>
<tbody>
<tr>
<th colspan="3">Engineering</th>
</tr>
<tr>
<td>Alice</td>
<td>Active</td>
<td>Seattle</td>
</tr>
<tr>
<td>Charlie</td>
<td>Active</td>
<td>London</td>
</tr>
</tbody>
</table>This provides a visual representation of grouping, but does not semantically communicate that Engineering identifies the group containing Alice and Charlie.
This proposal explores making that existing relationship available to user agents and assistive technologies while preserving existing table and grid navigation and providing backwards-compatible behavior in implementations that do not support the feature.
Goals
This proposal aims to:
- Provide a semantic relationship between a visible row-group caption and the rows it categorizes.
- Allow user agents to expose meaningful named row groups to accessibility APIs.
- Allow assistive technologies to announce row-group context while users navigate existing rows and cells.
- Preserve existing table and grid keyboard/navigation models.
- Preserve existing row geometry, including row counts and indices.
- Provide useful fallback behavior in browsers and assistive technologies that do not implement the feature.
- Work with both native HTML tables and ARIA
table,grid, andtreegridstructures.
Non-goals
This proposal does not attempt to:
- Introduce another navigation stop into table or grid navigation.
- Require assistive technologies to provide commands for navigating directly between row groups.
- Change the existing semantics or navigation behavior of ordinary unnamed
<tbody>orrowgroupelements. - Remove visual group-caption rows from the logical row count.
- Change how
aria-rowcount,aria-rowindex,aria-colcount, oraria-colindexwork. - Replace
rowheaderorcolumnheader. - Define visual styling for row-group captions.
Existing platform semantics
HTML row groups
HTML already allows a table to contain multiple <tbody> elements:
<table>
<tbody>
<!-- Engineering rows -->
</tbody>
<tbody>
<!-- Marketing rows -->
</tbody>
</table>This expresses structural grouping in the DOM.
However, the content model of <tbody> only permits <tr> and script-supporting elements. There is no equivalent of <caption> for a row group.
The following cannot therefore be used to visually and semantically label a <tbody>:
<!-- Invalid table structure -->
<tbody>
<div>Engineering</div>
<tr>
...
</tr>
</tbody>Authors instead commonly represent the group label as a row:
<tbody>
<tr>
<th colspan="3">Engineering</th>
</tr>
<tr>
...
</tr>
<tr>
...
</tr>
</tbody>The visual result communicates grouping, but the table semantics do not communicate that the spanning header labels the containing <tbody>.
ARIA rowgroup
ARIA already defines rowgroup as:
A structure containing one or more row elements in a tabular container.
rowgroup establishes a relationship between its owned row elements and is defined as the structural equivalent of HTML <thead>, <tbody>, and <tfoot>.
ARIA also currently allows an author-provided accessible name for rowgroup.
However, APG guidance currently says:
rowgroup— Do Not Name — Naming is not supported by assistive technologies.
Thus the structural primitive and accessible-name mechanism largely exist, but there is no interoperable authoring and assistive-technology pattern for using a visible label to communicate categorical row groups.
Developer need
Data tables and data grids commonly group records by a property such as:
- department,
- status,
- date,
- category,
- organization,
- region,
- account,
- project, or
- other application-specific categories.
Component libraries frequently render these groups as a full-width row between sets of data rows.
For example:
Engineering
Alice
Charlie
Marketing
Eve
Frank
The visual hierarchy communicates:
Engineering
├── Alice
└── Charlie
Marketing
├── Eve
└── Frank
The corresponding accessibility semantics commonly communicate only:
Engineering
Alice
Charlie
Marketing
Eve
Frank
The relationship has been flattened.
A screen reader user can infer the relationship from ordering, just as a sighted user potentially could infer relationships from unstructured text, but the relationship itself is not represented.
Proposed semantic model
This proposal introduces the concept of a row caption: visible content within a row that labels the containing row group.
One possible syntax is a new ARIA role:
<table>
<tbody>
<tr>
<th role="rowcaption" colspan="3">Engineering</th>
</tr>
<tr>
<td>Alice</td>
<td>Active</td>
<td>Seattle</td>
</tr>
<tr>
<td>Charlie</td>
<td>Active</td>
<td>London</td>
</tr>
</tbody>
</table>Conceptually, a supporting user agent would expose:
table
rowgroup "Engineering"
row
rowcaption "Engineering"
row
cell "Alice"
cell "Active"
cell "Seattle"
row
cell "Charlie"
cell "Active"
cell "London"
The rowcaption provides the accessible name of its containing rowgroup.
The caption remains contained by a row; the proposal does not require removing that row from table geometry.
ARIA grid equivalent
The same semantic relationship should be possible for ARIA grids:
<div role="grid">
<div role="rowgroup">
<div role="row">
<div role="rowcaption" aria-colspan="3">Engineering</div>
</div>
<div role="row">
<div role="gridcell">Alice</div>
<div role="gridcell">Active</div>
<div role="gridcell">Seattle</div>
</div>
<div role="row">
<div role="gridcell">Charlie</div>
<div role="gridcell">Active</div>
<div role="gridcell">London</div>
</div>
</div>
</div>The exact allowed host elements and required context for rowcaption are open questions.
Accessibility behavior
Row groups provide context, not navigation
A named row group should not introduce a new stop into table or grid navigation.
For example, an existing screen-reader command for moving vertically between cells should continue navigating cells exactly as it does today.
Given:
Engineering
Alice
Charlie
Marketing
Eve
navigation might produce an experience conceptually similar to:
Engineering group, Name Alice, row 2 of 5
Name Charlie, row 3 of 5
Marketing group, Name Eve, row 5 of 5
The exact announcement is controlled by the assistive technology and is not prescribed by this proposal.
The important behavior is that when navigating a row or cell, an assistive technology can determine its named row-group context.
Assistive technologies may announce a row-group name when entering a group or when the group context changes. They need not repeat the group name for every cell.
Existing navigation remains unchanged
This proposal does not require changes to:
- table navigation commands,
- grid navigation commands,
- directional cell navigation,
- row navigation,
- column navigation, or
- focus management within ARIA grids.
The relationship supplies additional context to existing navigation.
Row counts and indices
The row containing the row caption remains a row.
For example:
Engineering row 1
Alice row 2
Charlie row 3
Marketing row 4
Eve row 5
A supporting implementation does not reinterpret this as a three-row table.
This preserves existing behavior for:
- browser-derived row counts,
aria-rowcount,aria-rowindex,- virtualized grids,
- existing assistive-technology table navigation, and
- existing component libraries.
Although treating the group caption as a logical row may be less semantically pure than introducing a row-group caption outside the row model, preserving existing table geometry provides significantly better incremental compatibility.
A future proposal could separately explore whether table geometry should distinguish caption rows from data rows.
Backwards compatibility
Backwards compatibility is a primary design goal.
Consider:
<tbody>
<tr>
<th role="rowcaption" colspan="3">Engineering</th>
</tr>
...
</tbody>Implementations without row-caption support
An implementation that does not recognize rowcaption can continue exposing the existing table structure.
Conceptually:
row
cell/header "Engineering", spanning 3 columns
row
cell "Alice"
The user retains access to the visible group caption and existing table navigation.
Implementations with row-caption support
A supporting implementation can additionally expose the containing row group and its name:
rowgroup "Engineering"
row
rowcaption "Engineering"
row
cell "Alice"
Existing rows, indices, spans, and navigation remain intact.
The enhancement adds contextual information rather than removing or reinterpreting existing information.
Unnamed row groups
Ordinary structural row groups should not gain additional announcements merely because they exist.
For example:
<table>
<tbody>
...
</tbody>
</table>should continue behaving as it does today.
A user agent may omit an unnamed structural row group from the accessibility tree where permitted by platform accessibility mappings.
A row group with a rowcaption, however, contains meaningful categorical information and should be exposed to accessibility APIs as a named row group.
Conceptually:
unnamed tbody
→ existing behavior
tbody with rowcaption "Engineering"
→ rowgroup "Engineering"
This avoids introducing noisy "row group" announcements into ordinary tables.
Relationship to rowheader
A row caption is not a row header.
A rowheader identifies header information associated with cells in the corresponding row.
For example:
Alice | Active | Seattle
^^^^^
row header
A row caption instead identifies a collection of rows:
Engineering
├── Alice
└── Charlie
Using rowheader for "Engineering" therefore does not express the intended relationship.
Relationship to <caption>
This proposal is conceptually similar to the relationship between <caption> and <table>.
HTML provides:
<table>
<caption>
Employees
</caption>
...
</table>where visible content identifies the containing table.
There is currently no corresponding construct for:
table "Employees"
rowgroup "Engineering"
rowgroup "Marketing"
A rowcaption would provide the missing relationship between visible content and the containing row group.
Unlike <caption>, this proposal initially retains the caption inside an existing row in order to preserve HTML parsing, table layout, and backwards compatibility.
Alternatives considered
aria-label on <tbody>
<tbody aria-label="Engineering"></tbody>ARIA already has the conceptual machinery for an author-provided name on rowgroup.
However, this does not solve the need for a visible group caption and can allow the accessible and visible labels to diverge.
A visible rowcaption provides a single source for both.
aria-labelledby on <tbody>
<tbody aria-labelledby="engineering">
<tr>
<th id="engineering" colspan="3">Engineering</th>
</tr>
</tbody>This can express the intended relationship syntactically without introducing a new role.
It is therefore an important alternative that should be investigated.
However, current assistive-technology support for naming rowgroup is insufficient, and the markup does not identify the referenced element specifically as the caption for the row group.
A dedicated semantic could make the relationship explicit and allow user agents to derive it structurally.
Spanning header cell only
<tr>
<th colspan="3">Engineering</th>
</tr>This is the common fallback.
It communicates the visible presentation but not the semantic relationship between Engineering and subsequent rows.
rowheader
rowheader identifies a header for its corresponding row, not a containing group of rows. It therefore expresses a different relationship.
New HTML <rowcaption> element
A dedicated element could provide a cleaner content model:
<tbody>
<rowcaption>Engineering</rowcaption>
<tr>
...
</tr>
</tbody>However, introducing an element directly within <tbody> would require changes to HTML's table content and parsing models and would provide a less graceful fallback in existing implementations.
Using existing valid table structure with an additional semantic role offers a more incremental adoption path.
role="group"
A generic named group does not preserve the defined table/grid → rowgroup → row relationship and would require authors to replace specific tabular semantics with generic grouping semantics.
Progressive enhancement
The proposal is intentionally designed so that support can be adopted independently by:
- component libraries and authors,
- browser engines and accessibility APIs, and
- assistive technologies.
Existing implementations continue to receive useful table/grid semantics.
Supporting implementations gain additional categorical context.
No coordinated change to table-navigation commands is required.
This allows the feature to improve incrementally rather than requiring all parts of the accessibility stack to implement the feature simultaneously.
Potential accessibility-tree representation
An implementation might expose:
table "Employees"
rowgroup "Engineering"
row 1
rowcaption "Engineering"
row 2
cell "Alice"
cell "Active"
cell "Seattle"
row 3
cell "Charlie"
cell "Active"
cell "London"
rowgroup "Marketing"
row 4
rowcaption "Marketing"
row 5
cell "Eve"
cell "Active"
cell "Toronto"
The exact accessibility API mappings would need to be determined with browser implementers, platform accessibility API owners, and the ARIA Working Group.
Open questions
-
Is a new
rowcaptionrole necessary?Could interoperable support for
aria-labelledbyonrowgroupsolve the problem without introducing a role? -
Should
rowcaptionautomatically name its containingrowgroup?This proposal assumes that structural association is preferable to requiring authors to duplicate the relationship with
aria-labelledby. -
What roles should
rowcaptioninherit from?A caption has different semantics from
cell,gridcell,rowheader, andcolumnheader, but backwards compatibility with existing spanning cells is desirable. -
What should unsupported-role fallback be?
Investigation is needed across HTML
<th>,<td>, and generic elements used in ARIA grids. -
Should multiple row captions be permitted in one row group?
If so, how is the row group's accessible name calculated?
-
Should an explicitly supplied
aria-labeloraria-labelledbyoverride a structurally derived row-caption name?This could follow existing accessible-name precedence rules, but requires definition.
-
Should named
<thead>and<tfoot>row groups use the same mechanism?The initial use case concerns categorical body row groups, but
rowgrouprepresents all three HTML row-group types. -
How should nested or hierarchical grouping be represented?
This proposal initially addresses one level of categorical row grouping. Hierarchical data may instead belong to
treegridor require additional semantics. -
How should virtualized grids represent group captions?
Existing
aria-rowcountandaria-rowindexsemantics should remain unchanged, but virtualized implementations should be researched. -
What accessibility API mappings are required?
Current mappings and support should be investigated for UI Automation, AXAPI, ATK/AT-SPI, and other relevant accessibility APIs.
-
When should assistive technologies announce group context?
The proposal should expose sufficient semantics without prescribing exact speech. Research should determine whether announcing a group when entering or changing groups produces a useful experience across common screen readers.
Research needed
Before advancing beyond initial exploration, research should include:
- Common grouped-table and grouped-data-grid implementations in design systems and component libraries.
- Existing HTML patterns used to render group captions.
- Existing use of multiple
<tbody>elements for categorical grouping. - Browser accessibility-tree mappings for
<tbody>,<thead>, and<tfoot>. - Browser behavior for unknown ARIA roles on
<th>,<td>, and generic elements. - Current accessibility API representation of
rowgroup. - Screen-reader behavior for named
rowgroupelements. - Behavior of
aria-labelledbyandaria-labelon native<tbody>and explicitrole="rowgroup". - Interaction with
aria-rowcount,aria-rowindex, virtualization, and partial DOM rendering. - Developer/library demand for grouped rows.
- User research with screen-reader users to determine useful announcement behavior.
Relevant specifications and guidance
- HTML defines tables as permitting zero or more
<tbody>elements, providing an existing structural mechanism for multiple body row groups. - WAI-ARIA defines
rowgroupas a structural grouping of rows and as the semantic equivalent of<thead>,<tbody>, and<tfoot>. - WAI-ARIA currently permits an author-provided accessible name for
rowgroup. - APG currently recommends that authors not name
rowgroupbecause naming is not supported by assistive technologies. - APG defines
aria-rowcountandaria-rowindexfor cases where the DOM does not contain the complete set of rows, such as virtualized grids. - APG already recognizes
rowgroupas part of valid grid/table structure.
Summary
The web platform can currently represent:
these rows form a group
and it can visually represent:
Engineering
Alice
Charlie
but it cannot interoperably communicate:
Engineering
├── Alice
└── Charlie
to assistive technology.
Named row groups would fill that gap without changing existing table/grid navigation.
A row-caption semantic provides one possible backwards-compatible mechanism for associating the visible caption authors already render with the existing rowgroup structure:
<tbody>
<tr>
<th role="rowcaption" colspan="3">Engineering</th>
</tr>
...
</tbody>Unsupported implementations retain today's spanning-row experience. Supporting implementations gain the additional semantic relationship that the visible presentation already communicates to sighted use
Activity
sb3nder commentedon Oct 23, 2026
Would this solve it?(Writing from phone, can't test it)
Crissov commentedon Oct 23, 2026
Just for the record,
scope=rowgroupalready exists and has for a long time.scottaohara commentedon Oct 23, 2026
scope=rowgroupexists, but it might as well not from the current reality from an accessibility mappings pov.the entire concept of row groups really only exists in specs - in reality these groupings haven't been surfaced by screen readers - and that's partly because browsers never exposed the groupings in a meaningful way, until recently. For instance, it was only within the last few years that at least one browser even started mapping
tbody,tfootandtheadtorole=rowgroup. The reality of today is that browsers _only_ expose therowgrouprole if it is given an accessible name. And lol,scope=rowgroup` doesn't presently do anything to provide one.Even if one were to use an
aria-labeloraria-labelldbyon a native HTML element that should map torowgroupor an explicit ARIA role, testing with Narrator and NVDA on Windows and iOS VoiceOver, shows that even named rowgroups are still going unannounced by these screen readers.IMO, browsers should at least map the text of a
th scope=rolegroupas the accName for therowgroupit is meant to be associated with. ( and here's where i'm trying to get that process stared ) but, the ux / dx ofth scope=rowheaderis questionable (e.g., having to define atr > thand then either add in othertdelements or adjust thecolspanattribute.A new element could make this easier to define, possibly map (checking for an immediate child element, rather than as a descendent of a row within a rowgroup element) and if screen readers were to expose the rowgroup, they might even opt to skip direct navigation to the row group's header element, in favor of just announcing it / the grouping as someone entered the cells of that grouping.
NicholasBoll commentedon Oct 23, 2026
I think
scope=rowgroupwould solve this problem. I think I missed it because there is no equivalent role androle=rowgroupexplicitly said it could not be named.@scottaohara, your comment and your PR on the w3c contains
scope=rowheader. Is that supposed to meanscope=rowgroup? I didn't know if that was confused with the fact that the accessibility tree defines the implicit role to berowheaderNicholasBoll commentedon Oct 23, 2026
scope=rowgroupis the HTML table equivalent of what I'm trying to accomplish.There is still a platform gap for ARIA tables, grids, and treegrids. There is no apparent semantic equivalent
roleforscope=rowgroup.The WHATWG's table processing algorithm explains well how a row group should work. @scottaohara is filling in the gap in the w3c specification.
@scottaohara points out the questionable dx of a row group header (acting more like a header than simply a group name). If a row header acts more like a header (with possible jump navigation support), I think the current semantics make sense. A
gridcan have an optional row keyboard navigation mode. The specification is simpler if a "row group header" semantically lives inside arow- it will preserve the "cell" vs "row" navigation modes without hierarchy exceptions.scottaohara commentedon Oct 23, 2026
thanks @NicholasBoll, fixed my typo to
scope=rowgroupyeah, just accidently putrowheaderin there because of thethelement's implicit role.not sure i follow this comment. since
thead,tbodyandtfootare all meant to be implicitrole=rowgroupelements, and ARIA explicitly says they can be named from author - and ARIA in HTML does not state they cannot be named? Then maybe I thought you might have been talking aboutth/rowheader- but that can also be named (but probably shouldn't allow it...)Your second comment is also a bit strange to me...
Yes there is. It's the
tbody,theadandtfootelements.The gap is that there is no a11y mapping relationship between a
th scope=rowgroupto serve as the name for therowgroupthat the mentioned elements represent.The DX oddity is that one has to define a new row (
tr), theth scope=growgroup, and then any additional emptytdelements or acolspanattribute on thethelement.That's a lot more work then just doing something like:
The UX difference between the two would be someone entering the rowgroup could just hear that they've entered the group and its name (engineering). But with the current reality of
rowgroup, thethis still announced as arowheader- which is not really what it's intended to be used for. All the empty cells are still there and can still be reached by screen reader navigation... and that's kinda silly.My PR would help fix the naming gap that browsers seem to all have missed when implementing the accessibility of this feature... but just making the naming association won't fix the fact that the current UX and DX would still be rubbish, imo.
A new element, imo, is a good idea.
We haven't even mentioned that
scope=colgroupexists..... LOL whatever that's supposed to behave like since there is no concept of acolgrouprole mapping.NicholasBoll commentedon Oct 27, 2026
There is no ARIA role for
scope=rowgroup. There's an ARIA role forthead,tbody, andtfoot(althoughtbodyis ignored by Blink).This demonstrates the gap:
Regardless of the DX of
scope=rowgroup, there's no way to represent it using ARIA. This might be part of the problem.From https://w3c.github.io/aria/#rowgroup:
The specification allows an
aria-label, but surrounding guidance basically says not to label it. ARIA needs a semantic equivalent role forscope=rowgroupwith a specification for what it does.I agree a dedicated element like
<rowcaption>would be more ideal as a both a visual and accessible name for a row group. Current render engines reject non-table elements from a<table>. If you put a<div>or any other element inside a<table>,<tbody>, or any element except for the cell elements, that element is moved outside the table:Notice the
<rowcaption>is hoisted out of the table in the DOM. Introducing a new table element has no progressive enhancement story. Any browser that doesn't support the new element will generate an unintentional DOM and visual hierarchy.Crissov commentedon Oct 28, 2026
This sounds like it should be raised as an issue against ARIA instead.
NicholasBoll commentedon Oct 28, 2026
It looks like there is an issue: w3c/aria#2324
There isn't a lot of information, but it does cover a lack or a role for
scope=rowgroup.scottaohara commentedon Oct 28, 2026
role=captionexists. it'd likely be what would be used here as well.figcaption,legendand thecaptionelement all map to it (some nuances in the differences there... but, my point being that we likely don't need a "new role" - but more that the allowance forrole=captionshould be expanded to overtly account for this use case of providing a caption for arole=rowgroup)eh... making a role / reusing
captionis one aspect, but the primary thing here - as i mentioned before - is just that user agents / at really did nothing withrole=rowgroupbefore, and thus giving it a name now doesn't little to nothing. Named role=rowgroups are possible now - it's more a browser mapping gap / AT exposure gapBut you are right that
tableparsing is very strict and not something people generally want to touch/adjust. That'll likely be the biggest obstacle, if not full stop 'no', to introducing a new element.