Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ fn has_accessible_content(html_child_list: &HtmlElementList) -> bool {
let tag_text = element.name().ok().and_then(|n| n.token_text_trimmed());

match tag_text.as_ref().map(|t| t.as_ref()) {
Some(name) if name.eq_ignore_ascii_case("img") => {
Some(name) if name.eq_ignore_ascii_case("img") || name == "Image" => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's wrong.

Your PR says it checks for the Astro Image component. This checks for EVERY component, without discrimination.

html_self_closing_element_has_non_empty_attribute(element, "alt")
}
Some(name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@
<!-- Accessible via aria-label or title alone -->
<a aria-label="Navigate to dashboard"></a>
<a title="Go to settings page"></a>

<!-- Astro Image component with alt attribute should be treated like img -->
<a><Image src={profileImg} alt="profile picture" /></a>