--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.jsx --- # Input ```jsx
{}} />;
{}} />;
{}} onFocus={undefined} />;
{}} onBlur={undefined} />;
{}} onFocus={null} />;
{}} onBlur={null} />;
{}}>
;
{}}>
;
{}}>
;
{}}>
; ``` # Diagnostics ``` invalid.jsx:1:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOver must be accompanied by onFocus for accessibility. > 1 │
{}} />; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2 │
{}} />; 3 │
{}} onFocus={undefined} />; i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ``` ``` invalid.jsx:2:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOut must be accompanied by onBlur for accessibility. 1 │
{}} />; > 2 │
{}} />; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 3 │
{}} onFocus={undefined} />; 4 │
{}} onBlur={undefined} />; i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ``` ``` invalid.jsx:3:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOver must be accompanied by onFocus for accessibility. 1 │
{}} />; 2 │
{}} />; > 3 │
{}} onFocus={undefined} />; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4 │
{}} onBlur={undefined} />; 5 │
{}} onFocus={null} />; i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ``` ``` invalid.jsx:4:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOut must be accompanied by onBlur for accessibility. 2 │
{}} />; 3 │
{}} onFocus={undefined} />; > 4 │
{}} onBlur={undefined} />; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 │
{}} onFocus={null} />; 6 │
{}} onBlur={null} />; i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ``` ``` invalid.jsx:5:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOver must be accompanied by onFocus for accessibility. 3 │
{}} onFocus={undefined} />; 4 │
{}} onBlur={undefined} />; > 5 │
{}} onFocus={null} />; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6 │
{}} onBlur={null} />; 7 │
{}}>
; i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ``` ``` invalid.jsx:6:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOut must be accompanied by onBlur for accessibility. 4 │
{}} onBlur={undefined} />; 5 │
{}} onFocus={null} />; > 6 │
{}} onBlur={null} />; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 7 │
{}}>
; 8 │
{}}>
; i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ``` ``` invalid.jsx:7:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOver must be accompanied by onFocus for accessibility. 5 │
{}} onFocus={null} />; 6 │
{}} onBlur={null} />; > 7 │
{}}>
; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 8 │
{}}>
; 9 │
{}}>
; i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ``` ``` invalid.jsx:8:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOut must be accompanied by onBlur for accessibility. 6 │
{}} onBlur={null} />; 7 │
{}}>
; > 8 │
{}}>
; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 9 │
{}}>
; 10 │
{}}>
; i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ``` ``` invalid.jsx:9:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOut must be accompanied by onBlur for accessibility. 7 │
{}}>
; 8 │
{}}>
; > 9 │
{}}>
; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 10 │
{}}>
; i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ``` ``` invalid.jsx:10:1 lint/a11y/useKeyWithMouseEvents ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! onMouseOver must be accompanied by onFocus for accessibility. 8 │
{}}>
; 9 │
{}}>
; > 10 │
{}}>
; │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ i Actions triggered using mouse events should have corresponding events to account for keyboard-only navigation. ```