---
source: crates/biome_js_analyze/tests/spec_tests.rs
expression: invalid.jsx
---
# Input
```jsx
<>
void 0} />
void 0} />
void 0} />
void 0} />
Home
Home
Annual Reports
>;
```
# Diagnostics
```
invalid.jsx:2:2 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a href attribute for the a element.
1 │ <>
> 2 │
│ ^^^^^
3 │
4 │
i An anchor element should always have a href
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:3:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
1 │ <>
2 │
> 3 │
│ ^^^^
4 │
5 │
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:4:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
2 │
3 │
> 4 │
│ ^^^^^^^^^^^
5 │
6 │
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:5:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
3 │
4 │
> 5 │
│ ^^^^^^^^^^^^^^^^
6 │
7 │
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:6:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
4 │
5 │
> 6 │
│ ^^^^^^^
7 │
8 │
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:7:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
5 │
6 │
> 7 │
│ ^^^^^^^^
8 │
9 │
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:8:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
6 │
7 │
> 8 │
│ ^^^^^^^^^^
9 │
10 │
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:9:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
7 │
8 │
> 9 │
│ ^^^^^^^^^^
10 │
11 │
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:10:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
8 │
9 │
> 10 │
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
11 │
12 │
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:11:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
9 │
10 │
> 11 │
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 │
13 │ void 0} />
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:12:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Provide a valid value for the attribute href.
10 │
11 │
> 12 │
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 │ void 0} />
14 │ void 0} />
i The href attribute should be a valid a URL
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:13:5 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Use a button element instead of an a element.
11 │
12 │
> 13 │ void 0} />
│ ^^^^^^^^^^^^^^^^^^^^^^
14 │ void 0} />
15 │ void 0} />
i Anchor elements should only be used for default sections or page navigation
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:14:2 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Use a button element instead of an a element.
12 │
13 │ void 0} />
> 14 │ void 0} />
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 │ void 0} />
16 │ void 0} />
i Anchor elements should only be used for default sections or page navigation
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:15:2 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Use a button element instead of an a element.
13 │ void 0} />
14 │ void 0} />
> 15 │ void 0} />
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
16 │ void 0} />
17 │ Home
i Anchor elements should only be used for default sections or page navigation
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:16:2 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Use a button element instead of an a element.
14 │ void 0} />
15 │ void 0} />
> 16 │ void 0} />
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 │ Home
18 │ Home
i Anchor elements should only be used for default sections or page navigation
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:17:2 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Use a button element instead of an a element.
15 │ void 0} />
16 │ void 0} />
> 17 │ Home
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 │ Home
19 │ Annual Reports
i Anchor elements should only be used for default sections or page navigation
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:18:2 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Use a button element instead of an a element.
16 │ void 0} />
17 │ Home
> 18 │ Home
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19 │ Annual Reports
20 │ >;
i Anchor elements should only be used for default sections or page navigation
i Check this thorough explanation to better understand the context.
```
```
invalid.jsx:19:2 lint/a11y/useValidAnchor ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Use a button element instead of an a element.
17 │ Home
18 │ Home
> 19 │ Annual Reports
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 │ >;
21 │
i Anchor elements should only be used for default sections or page navigation
i Check this thorough explanation to better understand the context.
```