12}: SideBarButtonPropT) {
13 return (
14 <div>
15 <p16 className={`${active ? "" : "text-opacity-75"} text-dark`}17 style={{ cursor: "pointer" }}18 onClick={trigger}19 >20 {name}
21 </p>
22 </div>
Non-interactive HTML elements and non-interactive ARIA roles indicate content and containers in the user interface. A non-interactive element does not support event handlers (mouse and key handlers). Non-interactive elements include <main>
, <area>
, <h1>
(,<h2>
, etc), <p>
, <img>
, <li>
, <ul>
and <ol>
. Non-interactive WAI-ARIA roles include article
, banner
, complementary
, img
, listitem
, main
, region
and tooltip
.
<li onClick={() => void 0} />
<div onClick={() => void 0} role="listitem" />
<div onClick={() => void 0} role="button" />
<div onClick={() => void 0} role="presentation" />
<input type="text" onClick={() => void 0} /> // Interactive element does not require role.
<button onClick={() => void 0} className="foo" /> // button is interactive.
<div onClick={() => void 0} role="button" aria-hidden /> // This is hidden from screenreader.
<Input onClick={() => void 0} type="hidden" /> // This is a higher-level DOM component