FreeToGenerate.com

81 of 139 elements already have a role. Writing it again is discouraged.

Should you write this role?

You do not need it — the element already has this role

This is valid markup, not an error. The specification marks assigning an element's own implicit role as NOT RECOMMENDED, because it adds nothing and can drift from the element if the markup later changes.

Implicit role
button
Accepts
Only an enumerated set

The specification says: Roles: checkbox , combobox , gridcell , link , menuitem , menuitemcheckbox , menuitemradio , option , radio , separator , slider , switch , tab , or treeitem . ( button is also allowed, but NOT RECOMMENDED .) Global aria-* attributes and any aria-* attributes applicable to the allowed roles. If the button is the first child of a select element: No role or aria-* attributes

Which elements give you this role

Already have it, with no attribute

button, input type=button, input type=image, input type=reset, input type=submit

Will accept it if you ask

a with href, area without href, img, input type=image, input type=reset, input type=submit

What the table says overall

HTML elements covered
139
already have a role
81
accept no other role
51
have a conditional rule
10

The most useful answer is usually that you need no role at all. 81 of the 139 elements already carry one, and the specification's own table header says writing those into your markup is NOT RECOMMENDED — a button element is already a button, an h1 is already a heading.

Ten elements have rules that depend on their surroundings, and this page refuses to give a verdict on them rather than guessing. td, th and tr depend on the role of the ancestor table; div depends on whether it is a direct child of dl; figure depends on whether it has a figcaption.

Every element in the table

Showing 139 / 139

ElementImplicit roleAccepts
a with hreflinkbutton, checkbox, menuitem, menuitemcheckbox, menuitemradio, option, radio, switch, tab, treeitem
a without hrefgenericAny role
abbrnoneAny role
addressgroupAny role
area with hreflinkNo role beyond its own
area without hrefgenericbutton, link
articlearticleapplication, document, feed, main, none, presentation, region
asidecomplementaryfeed, none, note, presentation, region, search
audiononeapplication
autonomous custom elementnoneConditional
bgenericAny role
basenoneNo role beyond its own
bdigenericAny role
bdogenericAny role
blockquoteblockquoteAny role
bodygenericNo role beyond its own
brnonenone, presentation
buttonbuttoncheckbox, combobox, gridcell, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, separator, slider, switch, tab, treeitem
canvasnoneAny role
captioncaptionNo role beyond its own
citenoneAny role
codecodeAny role
colnoneNo role beyond its own
colgroupnoneNo role beyond its own
datagenericAny role
datalistlistboxNo role beyond its own
ddnoneNo role beyond its own
deldeletionAny role
detailsgroupNo role beyond its own
dfntermAny role
dialogdialogalertdialog
divgenericConditional
dlnonegroup, list, none, presentation
dtnonelistitem
ememphasisAny role
embednoneapplication, document, img, image, none, presentation
fieldsetgroupnone, presentation, radiogroup
figcaptionnonegroup, none
figurefigureConditional
footernonegroup, presentation, none
formformnone, presentation, search
form-associated custom elementnoneConditional
h1 to h6headingnone, presentation, tab
headnoneNo role beyond its own
headernonegroup, none, presentation
hgroupgroupAny role
hrseparatornone, presentation
htmlgenericNo role beyond its own
igenericAny role
iframenoneapplication, document, img, image, none, presentation
imgnonebutton, checkbox, link, math, menuitem, menuitemcheckbox, menuitemradio, meter, option, progressbar, radio, scrollbar, separator, slider, switch, tab, treeitem
img with no accessible namenoneConditional
input type=buttonbuttoncheckbox, combobox, gridcell, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, separator, slider, switch, tab, treeitem
input type=checkboxcheckboxmenuitemcheckbox, option, switch
input type=colornoneNo role beyond its own
input type=datenoneNo role beyond its own
input type=datetime-localnoneNo role beyond its own
input type=email with no list attributetextboxNo role beyond its own
input type=filenoneNo role beyond its own
input type=hiddennoneNo role beyond its own
input type=imagebuttonbutton, checkbox, gridcell, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, separator, slider, switch, tab, treeitem
input type=monthnoneNo role beyond its own
input type=numberspinbuttonNo role beyond its own
input type=passwordnoneNo role beyond its own
input type=radioradiomenuitemradio
input type=rangesliderNo role beyond its own
input type=resetbuttonbutton, checkbox, combobox, gridcell, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, separator, slider, switch, tab, treeitem
input type=search , with no list attributesearchboxNo role beyond its own
input type=submitbuttonbutton, checkbox, combobox, gridcell, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, separator, slider, switch, tab, treeitem
input type=tel , with no list attributetextboxNo role beyond its own
input type=text or with a missing or invalid type , with no list attributetextboxcombobox, searchbox, spinbutton
input type=text , search , tel , url , email , or with a missing or invalid type , with a list attributecomboboxNo role beyond its own
input type=timenoneNo role beyond its own
input type=url with no list attributetextboxNo role beyond its own
input type=weeknoneNo role beyond its own
insinsertionAny role
kbdnoneAny role
labelnoneConditional
legendnoneNo role beyond its own
linoneNo role beyond its own
linknoneNo role beyond its own
mainmainNo role beyond its own
mapnoneNo role beyond its own
marknoneAny role
mathmathNo role beyond its own
menulistgroup, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree
metanoneNo role beyond its own
metermeterNo role beyond its own
navnavigationmenu, menubar, none, presentation, tablist
noscriptnoneNo role beyond its own
objectnoneapplication, document, img, image
ollistgroup, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree
optgroupgroupNo role beyond its own
option element that is in a list of options or that represents a suggestion in a datalistoptionNo role beyond its own
outputstatusAny role
pparagraphAny role
paramnoneNo role beyond its own
picturenoneNo role beyond its own
pregenericAny role
progressprogressbarNo role beyond its own
qgenericAny role
rpnoneAny role
rtnoneAny role
rubynoneAny role
sdeletionAny role
sampgenericAny role
scriptnoneNo role beyond its own
searchsearchform, group, none, presentation, region
sectionregionalert, alertdialog, application, banner, complementary, contentinfo, dialog, document, feed, group, log, main, marquee, navigation, none, note, presentation, search, status, tabpanel
select (with NO multiple attribute and NO size attribute having value greater than 1 )comboboxmenu
select (with a multiple attribute or a size attribute having value greater than 1 )listboxNo role beyond its own
selectedcontentgenericConditional
slotnoneNo role beyond its own
smallgenericAny role
sourcenoneNo role beyond its own
spangenericAny role
strongstrongAny role
stylenoneNo role beyond its own
subsubscriptAny role
summarynoneNo role beyond its own
supsuperscriptAny role
SVGgraphics-documentAny role
tabletableAny role
tbodyrowgroupAny role
tdnoneConditional
templatenoneNo role beyond its own
textareatextboxNo role beyond its own
tfootrowgroupAny role
thnoneConditional
theadrowgroupAny role
timetimeAny role
titlenoneNo role beyond its own
trrowConditional
tracknoneNo role beyond its own
ugenericAny role
ullistgroup, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree
varnoneAny role
videononeapplication
wbrnonenone, presentation

Everything here comes from the ARIA in HTML specification's table of ARIA attribute usage by HTML element, and each row carries the specification's own sentence. Nothing is uploaded. Snapshot taken 2026-08-03

Also available in: Español · Português · Français · العربية

ARIA roles: which element needs one, and which already has it

Look up any HTML element and any ARIA role and find out whether you should write it, whether you may, or whether the element is already that thing.

What is an ARIA role?

An ARIA role tells assistive technology what a piece of markup is: a button, a navigation landmark, a heading, a dialog. You write it as role="button" and it changes how a screen reader announces the element and what a user can do with it.

WAI-ARIA defines the roles themselves. A second specification, ARIA in HTML, answers the question people actually arrive with — which roles may go on which HTML element — and it does so in a table covering 139 elements. That table is what this page is built from, and it is the one worth reading, because roles are not interchangeable across elements.

The single most useful thing in it is easy to miss. 81 of those 139 elements already carry a role without any attribute at all, and the table's own header says assigning those in markup is NOT RECOMMENDED. A button element is already a button. An h1 is already a heading with a level. Most of the time the correct answer to "which role goes here" is none.

How to use it

  1. Type the element. Just the tag name — angle brackets and capitals are fine. Where the specification qualifies an element, a bare name resolves to the qualified row: typing a gets the rule for a with href.
  2. Type the role you were about to write. You get one of four answers: the element already has it, it is allowed, it is not allowed here, or the rule is conditional and no straight answer exists.
  3. Then look at the reverse index underneath. It lists the elements that already have that role with no attribute, separately from those that will merely accept it. That is usually the better way to solve the problem.

Redundant is not the same as wrong

Writing role="button" on a button element is valid markup. It is not an error and nothing will break. The specification marks it NOT RECOMMENDED because it adds nothing and because it can drift: change the element later and the role stays behind, now describing something that no longer exists. This page reports that case as its own verdict rather than folding it in with the genuine errors, since telling someone their working markup is broken is worse than saying nothing.

The genuinely disallowed cases are a different matter. 51 elements accept no role beyond the one they already have — main, body, html, base, caption and the rest — so role="navigation" on a main element is simply not permitted. 37 more accept only an enumerated set: an a with href will take button, checkbox, menuitem, menuitemcheckbox, menuitemradio, option, radio, switch, tab or tree, and nothing else. And 41 elements, the blank slates like span and abbr, accept any role at all.

That leaves the roles themselves, 75 of which the table names. If you need one, the reverse index is the shortcut: ask which elements already are a button before you decide to make one out of a div.

Ten elements where this page will not answer

Ten of the 139 rules are written with a condition, and the tool refuses to give a verdict on them rather than guessing. td, th and tr depend on the role of the ancestor table element. div depends on whether it is a direct child of dl. figure depends on whether it has a figcaption descendant. label depends on whether it is associated with a labelable element.

In every one of those cases the specification declines to state an unconditional rule, so a tool that produced a confident yes or no would be inventing one. The specification's own sentence is shown instead, to be read against your actual markup. That is the honest answer, and it is why this page shows the source text for every element rather than only its own summary.

Two further limits worth stating. This is the element table only — ARIA in HTML has two more tables, one about HTML features and one about which descendants a role allows, and neither is covered here. And the page tells you what is permitted, not what is a good idea: a permitted role can still be the wrong one, and no table can tell you whether your widget actually behaves like a tab.

Why is it free?

The table travels with the page as a few kilobytes and every lookup runs in your own browser. Nothing you type is uploaded, nothing is logged, and there is no account to create.

No sign-up, no limits, and no watermark on anything you copy.