Handvask / handvask

Prefer to accompany onClick with some elements JS-0746
Anti-pattern
Minor
a year agoa year old
Visible, non-interactive elements with click handlers must have at least one keyboard listener
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>
Visible, non-interactive elements with click handlers must have at least one keyboard listener
50      aria-hidden="true"
51      style={{ ...dClass }}
52    >
53      <div54        className="modal-backdrop-custom bg-dark bg-opacity-50 vw-100 vh-100 position-fixed"55        onClick={onClose}56        role="button"57      />58      <div
59        className="modal-dialog modal-xl modal-dialog-scrollable modal-dialog-centered modal-sm"
60        role="document"