Reports static elements with event handlers that lack ARIA roles.
✅ This rule is included in the jsx logical and logicalStrict presets.
Static HTML elements like <div> and <span> have no semantic meaning.
When adding interactive event handlers to these elements, you should provide a role attribute to convey their purpose to screen readers, search engine crawlers, and other technologies that rely on semantic elements.
Semantic HTML elements like <button> already have appropriate roles and don’t need additional attributes.
This is required for WCAG 4.1.2 compliance.
C E6d C B0onCli A 3 <4{sp ansty="le--0:#D9F5DD;--1:#1111">114{sp><()sp ansty="le--1:#8844">C EA <=>sp ansty="le--0:#7FDB">CA =>sp>()sp><{}sp ansty="le--0:#E2817F;--1:#B238">3{}sp><4}sp ansty="le--0:#7FDBCA;--1:#8844">AE 4}sp> >d ivclassNa="meco"> {}} ">>d>/>d> />d>C E6sp C B0onKeyDo A 3 <4{sp ansty="le--0:#D6DEEB;--1:#403F">53handl4{sp>3 <4}sp ansty="le--0:#7FDBCA;--1:#8844">AE 4}sp> >d ivclassNa="meco">>d>/>d> />d><44AE spans="tyle--0:#7F">D44AE>ECE <6div spans="tyle--0:#7F">D6div>61B0onC 4 <4AE= spans="tyle--0:#E2817F;--1:#B2">34AE=><834{ spans="tyle--0:#D9F5DD;--1:#11">11834{><11() spans="tyle--1:#88"><44AE spans="tyle--0:#7F">D44AE>92 spans="tyle--0:#7F">DBC >11()>3 <834} spans="tyle--0:#7FDBCA;--1:#88">4834}><4AE spans="tyle--0:#C5E478;--1:#3B">61B04AE >4 <4AE= spans="tyle--0:#D9F5DD;--1:#11">14AE=><111" spans="tyle--0:#ECC48D;--1:#98">4E4Dbu111">1 <111" spans="tyle--0:#7FDBCA;--1:#88">44A111"> {}} role="button"><" />" /> <>di vdivclass="Nameexpressive-"><44AE spans="tyle--0:#7F">D44AE>ECE6 D 61B0onKey 4 <4AE= spans="tyle--0:#E2817F;--1:#B2">34AE=><834{ spans="tyle--0:#D6DEEB;--1:#40">3F53han834{>3 <834} spans="tyle--0:#7FDBCA;--1:#88">4834}><4AE spans="tyle--0:#C5E478;--1:#3B">61B04AE >4 <4AE= spans="tyle--0:#D9F5DD;--1:#11">14AE=><111" spans="tyle--0:#ECC48D;--1:#98">4E4D111"> 1<111" spans="tyle--0:#7FDBCA;--1:#88">44A111"><" />" /> >di><>di vdivclass="Nameexpressive-"><44AE spans="tyle--0:#7F">D44AE>ECE6bu D 61B0onC 4 <4AE= spans="tyle--0:#E2817F;--1:#B2">34AE=><834{ spans="tyle--0:#D9F5DD;--1:#11">11834{><11() spans="tyle--1:#88"><44AE spans="tyle--0:#7F">D44AE>92 spans="tyle--0:#7F">DBC >11()>3 <834} spans="tyle--0:#7FDBCA;--1:#88">44A834}> {}"><} />} /> >di>
If you are using a framework that automatically assigns element roles, you can disable this rule.