File tree Expand file tree Collapse file tree
tests/specs/a11y/noStaticElementInteractions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @biomejs/biome " : patch
3+ ---
4+
5+ Now the rule [ ` noStaticElementInteractions ` ] ( https://biomejs.dev/linter/rules/no-static-element-interactions/ ) doesn't trigger custom elements.
Original file line number Diff line number Diff line change @@ -101,8 +101,8 @@ impl Rule for NoStaticElementInteractions {
101101 fn run ( ctx : & RuleContext < Self > ) -> Self :: Signals {
102102 let node = ctx. query ( ) ;
103103
104- // Custom components are not checked because we do not know what DOM will be used.
105- if node. is_custom_component ( ) {
104+ // Custom components and elements are not checked because we do not know what DOM will be used.
105+ if node. is_custom_component ( ) || node . is_custom_element ( ) {
106106 return None ;
107107 }
108108
Original file line number Diff line number Diff line change 44 < Button onClick = { doFoo } />
55 < Button onClick = { doFoo } />
66 < div />
7+ < custom-element onClick = { doFoo } />
78 < div className = "foo" />
89 < div className = "foo" { ...props } />
910 < div onClick = { ( ) => void 0 } aria-hidden />
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ expression: valid.jsx
1010 <Button onClick = { doFoo } />
1111 <Button onClick = { doFoo } />
1212 <div />
13+ <custom-element onClick = { doFoo } />
1314 <div className = " foo" />
1415 <div className = " foo" { ... props } />
1516 <div onClick = { () => void 0 } aria-hidden />
You can’t perform that action at this time.
0 commit comments