<div role="menuitemradio"><h6>Name of my radio button</h6></div>ARIA: menuitemradio role / notebook
ARIA: menuitemradio role
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<div role="menuitemradio">
<h6 role="presentation">Name of my radio button</h6>
</div><div role="menuitemradio">Name of my radio button</div><li role="menuitemradio" tabindex="-1" aria-checked="false">Purple</li>[role="menuitemradio"]::before {
display: inline-block;
content: "";
width: 1em;
height: 1em;
padding: 0.1em;
border: 2px solid #333333;
border-radius: 50%;
box-sizing: border-box;
background-clip: content-box;
margin-inline-end: 2px;
}
[role="menuitemradio"][aria-checked="true"]::before {
background-color: purple;
}