Favorites

ARIA comment Role

This is part of the WAI-ARIA 1.3 draft. Support in browsers and screen readers is still incomplete, so test it with the assistive technology your users rely on.

comment
ARIA Document Structure RoleThis ARIA role is supported by most modern browsers, though support in some browsers is unknown.
Updated 28th November 2026

The comment role marks a comment or reaction to some content, such as a reviewer's note on a document or a reply in a discussion thread.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Description

The comment role identifies a comment or annotation on content, such as a note in a collaborative document editor or a reply in a discussion thread. Comments can be nested to form threads, using aria-level, aria-posinset and aria-setsize where needed.

To tie a comment to the text it is about, mark the text (for example with <mark>) and point to the comment with aria-details.

Properties

Category
Document Structure
HTML equivalent
None
Accessible name from
author, contents
Required parent role
None
Required child roles
None

ARIA Attributes

Required
None
Supported
aria-level, aria-posinset, aria-setsize
Prohibited
None
Global
All global ARIA attributes can also be used, such as aria-label, aria-labelledby, aria-describedby, aria-hidden.

Syntax

<element role="comment">

Example

<p>The project is due <mark aria-details="c1">on Friday</mark>.</p>
<div role="comment" id="c1" aria-label="Comment by Sam">
<p><b>Sam:</b> Can we move this to Monday?</p>
</div>

Browser Support

The following information will show you the current browser support for the comment ARIA role. Hover over a browser icon to see the version that first introduced support for this ARIA role.

This ARIA role is supported by most modern browsers, though support in some browsers is unknown.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee