uselotus / lotus

File .deepsource.toml not found in the default branch of the repository root. Please refer to the docs.

Prefer that non-interactive, visible elements (such as <div>) that have click handlers use the role attribute JS-0765
Anti-pattern
Minor
a year agoa year old
Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element
305            <div className="grid grid-cols-3 mt-6 mb-3 justify-items-center">
306              <div className="col-span-1">
307                <Button>
308                  <a onClick={openplanCurrentModal}>Choose Plans To Replace</a>309                </Button>
310                <div>
311                  {substitutions.map((substitution, index) => {
Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element
211        )}
212      </Form.Item>
213    ) : (
214      <div215        className="editable-cell-value-wrap"216        style={{ paddingRight: 24 }}217        onClick={validateEditable(dataIndex, record) ? toggleEdit : () => {}}218      >219        {children}
220      </div>
221    );
Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element
 90    <div>
 91      <div className={className}>
 92        {versions.map((version) => (
 93          <div 94            onClick={() => setSelectedVersion(version)} 95            className={[ 96              "flex items-center justify-center versionChip mx-1", 97              isSelectedVersion(version.version_id) 98                ? "bg-[#c3986b] text-white opacity-100" 99                : "bg-[#EAEAEB] text-black",100              version.status === "active" &&101                "border-2 border-[#c3986b] border-opacity-100",102            ].join(" ")}103          >104            v{version.version}
105          </div>
106        ))}
Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element
130            />
131          </div>
132
133          <div className="right-3" onClick={(e) => e.stopPropagation()}>134            <Dropdown overlay={menu} trigger={["click"]}>
135              <Button
136                type="text"
Avoid non-native interactive elements. If using native HTML is not possible, add an appropriate role and support for tabbing, mouse, keyboard, and touch inputs to an interactive content element
 74    <div className="flex items-center justify-around tabsContainer">
 75      {tabs.map((tab) => (
 76        <Tooltip title={getToolTipText(tab)}>
 77          <div 78            onClick={() => { 79              if ( 80                tab === "Active" && 81                currentActiveTab !== "Active" && 82                currentActiveTab !== "Retiring" 83              ) { 84                setActiveModal(); 85              } 86            }} 87            className={[ 88              "tabItem flex items-center", 89              currentActiveTab === tab && "activeTab text-black", 90            ].join(" ")} 91          > 92            {tab}
 93          </div>
 94        </Tooltip>