--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: img.jsx --- # Input ```jsx // invalid <> {undefined} {undefined} ; // valid <> foo {"foo"} {alt} foo foo
{function(e)
{() void 0} /> test {alt {photo.caption}; {bar()}; {foo.bar {bar() {foo.bar() {`${undefined}`}  this is lit... {error {undefined {plugin.name ; ``` # Diagnostics ``` img.jsx:3:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 1 │ // invalid 2 │ <> > 3 │ │ ^^^^^^^ 4 │ 5 │ {undefined} i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:4:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 2 │ <> 3 │ > 4 │ │ ^^^^^^^^^^^ 5 │ {undefined} 6 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:5:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 3 │ 4 │ > 5 │ {undefined} │ ^^^^^^^^^^^^^^^^^^^^^^^ 6 │ 7 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:6:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 4 │ 5 │ {undefined} > 6 │ │ ^^^^^^^^^^^^^^^^^ 7 │ 8 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:7:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 5 │ {undefined} 6 │ > 7 │ │ ^^^^^^^^^^^^ 8 │ 9 │ {undefined} i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:8:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 6 │ 7 │ > 8 │ │ ^^^^^^^^^^^^^^^^^^^^^^^ 9 │ {undefined} 10 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:9:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 7 │ 8 │ > 9 │ {undefined} │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 10 │ 11 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:10:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 8 │ 9 │ {undefined} > 10 │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11 │ 12 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:11:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 9 │ {undefined} 10 │ > 11 │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^ 12 │ 13 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:12:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 10 │ 11 │ > 12 │ │ ^^^^^^^^^^^^^^^^^^^ 13 │ 14 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:13:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 11 │ 12 │ > 13 │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 14 │ 15 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:14:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 12 │ 13 │ > 14 │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 15 │ 16 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:15:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 13 │ 14 │ > 15 │ │ ^^^^^^^^^^^^^^^^^^^^^ 16 │ 17 │ ; i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ``` ``` img.jsx:16:3 lint/a11y/useAltText ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Provide a text alternative through the alt, aria-label or aria-labelledby attribute 14 │ 15 │ > 16 │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ 17 │ ; 18 │ i Meaningful alternative text on elements helps users relying on screen readers to understand content's purpose within a page. ```