<div role="menuitemcheckbox"><h6>Name of my checkbox</h6></div>ARIA: menuitemcheckbox role / notebook
ARIA: menuitemcheckbox role
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<div role="menuitemcheckbox">
<h6 role="presentation">Name of my checkbox</h6>
</div><div role="menuitemcheckbox">Name of my checkbox</div><li role="menuitemcheckbox" tabindex="-1" aria-checked="false">Purple</li>[role="menuitemcheckbox"]::before {
display: inline-block;
content: "";
color: transparent;
width: 1em;
text-align: center;
outline: 1px solid;
margin-inline-end: 2px;
font-family: sans-serif;
}
[role="menuitemcheckbox"][aria-checked="true"]::before {
color: inherit;
content: "X";
}