Skip to content

fix: remove invalid alt attribute from anchor tag in Print component#7924

Merged
alexander-akait merged 1 commit intowebpack:mainfrom
ryzrr:fix/remove-invalid-alt-from-print-link
Mar 6, 2026
Merged

fix: remove invalid alt attribute from anchor tag in Print component#7924
alexander-akait merged 1 commit intowebpack:mainfrom
ryzrr:fix/remove-invalid-alt-from-print-link

Conversation

@ryzrr
Copy link
Contributor

@ryzrr ryzrr commented Mar 5, 2026

Summary
Removes an invalid attribute from the "" tag in the Print sidebar component. "alt" is not a valid HTML attribute for anchor elements : - browsers silently ignore it but it fails HTML validation. link already has its title="Print" for the tooltip and the nested image already has alt="Printer Icon" .

What kind of change does this PR introduce?
fix

Did you add tests for your changes?
No , removing an attribute which was already ignored cannot affect behavior.

Does this PR introduce a breaking change?
No

If relevant, what needs to be documented once your changes are merged or what have you already documented?
N/A

Use of AI
N/A

alt is not a valid HTML attribute for <a> elements. It is only valid
on <img>, <input type="image">, and <area>. The attribute was silently
ignored by browsers but flagged as invalid HTML by validators.

The link already has title="Print" for the tooltip and the nested <img>
already has the correct alt="Printer Icon".
@vercel
Copy link

vercel bot commented Mar 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-js-org Ready Ready Preview, Comment Mar 5, 2026 8:21pm

Request Review

Copy link
Contributor

@rahul-kr-rai rahul-kr-rai left a comment

Choose a reason for hiding this comment

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

The core change is the removal of the alt attribute from the anchor <a> tag in Print.jsx. This is a valid technical cleanup because alt is not a permitted attribute for links in HTML5.

The component maintains accessibility through the existing title attribute and link text.

Ready to merge.

@alexander-akait alexander-akait merged commit 84e95f5 into webpack:main Mar 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants