-
-
Notifications
You must be signed in to change notification settings - Fork 918
fix(biome_html_analyze): recognize Astro Image component in useAnchorContent #9369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@biomejs/biome": patch | ||
| --- | ||
|
|
||
| Fixed [#9210](https://github.com/biomejs/biome/issues/9210): [`useAnchorContent`](https://biomejs.dev/linter/rules/use-anchor-content/) no longer reports an accessibility error for Astro `Image` components inside links when they provide non-empty `alt` text. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,4 +16,8 @@ | |
| <!-- Accessible via aria-label or title alone --> | ||
| <a aria-label="Navigate to dashboard"></a> | ||
| <a title="Go to settings page"></a> | ||
|
|
||
| <!-- Custom components may render accessible content --> | ||
| <a><Image alt="description" /></a> | ||
| <a><CustomIcon /></a> | ||
|
Comment on lines
+20
to
+22
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep the non-Astro fixtures out of Line 21 and Line 22 codify that Vue custom components satisfy Suggested adjustment- <!-- Custom components may render accessible content -->
- <a><Image alt="description" /></a>
- <a><CustomIcon /></a>🤖 Prompt for AI Agents
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @coderabbitai that's the whole point of the test. Since we don't know if a possible component renders something, we add a test to make sure it doesn't trigger a false positive. The previous commit mistakenly emitted a diagnostic
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
✏️ Learnings added
🧠 Learnings used |
||
| </template> | ||
Uh oh!
There was an error while loading. Please reload this page.