--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.jsx --- # Input ```jsx <>

title

title

{/* Needs to check the ancestors: */}
bar
  1. {/* Needs to check the ancestors: */} {/* Needs to check the ancestors: */}
    ; ``` # Diagnostics ``` invalid.jsx:2:16 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'article' on the 'article' element is redundant, because it is implied by the semantic 'article' element. 1 │ <> > 2 │
    │ ^^^^^^^^^ 3 │ 4 │

    i Unsafe fix: Remove the role attribute. 2 │ → │ -------------- ``` ``` invalid.jsx:3:15 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'button' on the 'button' element is redundant, because it is implied by the semantic 'button' element. 1 │ <> 2 │
    > 3 │ │ ^^^^^^^^ 4 │

    5 │ title i Unsafe fix: Remove the role attribute. 3 │ → │ ------------- ``` ``` invalid.jsx:4:11 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'heading' on the 'h1' element is redundant, because it is implied by the semantic 'h1' element. 2 │
    3 │ > 4 │

    │ ^^^^^^^^^ 5 │ title 6 │

    i Unsafe fix: Remove the role attribute. 4 │ → │ --------------- ``` ``` invalid.jsx:7:11 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'heading' on the 'h1' element is redundant, because it is implied by the semantic 'h1' element. 5 │ title 6 │

    > 7 │

    title

    │ ^^^^^^^^^ 8 │

    9 │ i Unsafe fix: Remove the role attribute. 7 │ → title

    │ -------------- ``` ``` invalid.jsx:8:11 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'heading' on the 'h2' element is redundant, because it is implied by the semantic 'h2' element. 6 │ 7 │

    title

    > 8 │

    │ ^^^^^^^^^^^ 9 │ 10 │ i Unsafe fix: Remove the role attribute. 8 │ → │ ---------------- ``` ``` invalid.jsx:9:15 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'dialog' on the 'dialog' element is redundant, because it is implied by the semantic 'dialog' element. 7 │

    title

    8 │

    > 9 │ │ ^^^^^^^^ 10 │ 11 │
    i Unsafe fix: Remove the role attribute. 9 │ → │ ------------- ``` ``` invalid.jsx:10:30 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'checkbox' on the 'input' element is redundant, because it is implied by the semantic 'input' element. 8 │

    9 │ > 10 │ │ ^^^^^^^^^^ 11 │
    12 │
    i Unsafe fix: Remove the role attribute. 10 │ → │ ---------------- ``` ``` invalid.jsx:11:15 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'figure' on the 'figure' element is redundant, because it is implied by the semantic 'figure' element. 9 │ 10 │ > 11 │
    │ ^^^^^^^^ 12 │
    13 │ {/* Needs to check the ancestors: */} i Unsafe fix: Remove the role attribute. 11 │ → │ ------------- ``` ``` invalid.jsx:12:13 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'form' on the 'form' element is redundant, because it is implied by the semantic 'form' element. 10 │ 11 │
    > 12 │
    │ ^^^^^^ 13 │ {/* Needs to check the ancestors: */} 14 │
    i Unsafe fix: Remove the role attribute. 12 │ → │ ----------- ``` ``` invalid.jsx:14:17 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'group' on the 'fieldset' element is redundant, because it is implied by the semantic 'fieldset' element. 12 │
    13 │ {/* Needs to check the ancestors: */} > 14 │
    │ ^^^^^^^ 15 │ bar 16 │ i Unsafe fix: Remove the role attribute. 14 │ → │ ------------ ``` ``` invalid.jsx:15:32 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'img' on the 'img' element is redundant, because it is implied by the semantic 'img' element. 13 │ {/* Needs to check the ancestors: */} 14 │
    > 15 │ bar │ ^^^^^ 16 │ 17 │ i Unsafe fix: Remove the role attribute. 15 │ → │ ----------- ``` ``` invalid.jsx:16:19 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'presentation' on the 'img' element is redundant, because it is implied by the semantic 'img' element. 14 │
    15 │ bar > 16 │ │ ^^^^^^^^^^^^^^ 17 │ 18 │
      i Unsafe fix: Remove the role attribute. 16 │ → │ ------------------- ``` ``` invalid.jsx:17:19 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'link' on the 'a' element is redundant, because it is implied by the semantic 'a' element. 15 │ bar 16 │ > 17 │ │ ^^^^^^ 18 │
        19 │
          i Unsafe fix: Remove the role attribute. 17 │ → │ ----------- ``` ``` invalid.jsx:18:11 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'list' on the 'ol' element is redundant, because it is implied by the semantic 'ol' element. 16 │ 17 │ > 18 │
            │ ^^^^^^ 19 │
              20 │ i Unsafe fix: Remove the role attribute. 18 │ → │ ----------- ``` ``` invalid.jsx:19:11 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'list' on the 'ul' element is redundant, because it is implied by the semantic 'ul' element. 17 │ 18 │
                > 19 │
                  │ ^^^^^^ 20 │ 21 │ i Unsafe fix: Remove the role attribute. 19 │ → │ ----------- ``` ``` invalid.jsx:20:27 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'combobox' on the 'select' element is redundant, because it is implied by the semantic 'select' element. 18 │
                    19 │
                      > 20 │ │ ^^^^^^^^^^ 21 │ 22 │
                    • i Unsafe fix: Remove the role attribute. 20 │ → │ --------------- ``` ``` invalid.jsx:21:45 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'listbox' on the 'select' element is redundant, because it is implied by the semantic 'select' element. 19 │
                        20 │ > 21 │ │ ^^^^^^^^^ 22 │
                      • 23 │ i Unsafe fix: Remove the role attribute. 21 │ → │ -------------- ``` ``` invalid.jsx:22:11 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'listitem' on the 'li' element is redundant, because it is implied by the semantic 'li' element. 20 │ 21 │ > 22 │
                      • │ ^^^^^^^^^^ 23 │ 24 │ {/* Needs to check the ancestors: */} i Unsafe fix: Remove the role attribute. 22 │ → │ --------------- ``` ``` invalid.jsx:23:12 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'navigation' on the 'nav' element is redundant, because it is implied by the semantic 'nav' element. 21 │ 22 │
                      • > 23 │ │ ^^^^^^^^^^^^ 24 │ {/* Needs to check the ancestors: */} 25 │ i Unsafe fix: Remove the role attribute. 23 │ → │ ----------------- ``` ``` invalid.jsx:25:11 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'row' on the 'tr' element is redundant, because it is implied by the semantic 'tr' element. 23 │ 24 │ {/* Needs to check the ancestors: */} > 25 │ │ ^^^^^ 26 │ 27 │ i Unsafe fix: Remove the role attribute. 25 │ → │ ---------- ``` ``` invalid.jsx:26:14 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'rowgroup' on the 'tbody' element is redundant, because it is implied by the semantic 'tbody' element. 24 │ {/* Needs to check the ancestors: */} 25 │ > 26 │ │ ^^^^^^^^^^ 27 │ 28 │ i Unsafe fix: Remove the role attribute. 26 │ → │ --------------- ``` ``` invalid.jsx:27:14 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'rowgroup' on the 'tfoot' element is redundant, because it is implied by the semantic 'tfoot' element. 25 │ 26 │ > 27 │ │ ^^^^^^^^^^ 28 │ 29 │ {/* Needs to check the ancestors: */} i Unsafe fix: Remove the role attribute. 27 │ → │ --------------- ``` ``` invalid.jsx:28:14 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'rowgroup' on the 'thead' element is redundant, because it is implied by the semantic 'thead' element. 26 │ 27 │ > 28 │ │ ^^^^^^^^^^ 29 │ {/* Needs to check the ancestors: */} 30 │ i Unsafe fix: Remove the role attribute. 28 │ → │ --------------- ``` ``` invalid.jsx:30:28 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'searchbox' on the 'input' element is redundant, because it is implied by the semantic 'input' element. 28 │ 29 │ {/* Needs to check the ancestors: */} > 30 │ │ ^^^^^^^^^^^ 31 │
                        32 │ i Unsafe fix: Remove the role attribute. 30 │ → │ ----------------- ``` ``` invalid.jsx:31:14 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'table' on the 'table' element is redundant, because it is implied by the semantic 'table' element. 29 │ {/* Needs to check the ancestors: */} 30 │ > 31 │
                        │ ^^^^^^^ 32 │ 33 │ i Unsafe fix: Remove the role attribute. 31 │ → │ ------------ ``` ``` invalid.jsx:32:17 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'textbox' on the 'textarea' element is redundant, because it is implied by the semantic 'textarea' element. 30 │ 31 │
                        > 32 │ │ ^^^^^^^^^ 33 │ 34 │ ; i Unsafe fix: Remove the role attribute. 32 │ → │ -------------- ``` ``` invalid.jsx:33:26 lint/a11y/noRedundantRoles FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Using the role attribute 'textbox' on the 'input' element is redundant, because it is implied by the semantic 'input' element. 31 │
                        32 │ > 33 │ │ ^^^^^^^^^ 34 │ ; 35 │ i Unsafe fix: Remove the role attribute. 33 │ → │ --------------- ```