You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rule Change: report whitespace-only string as alt text in markdown image #749
The quotes inside the square brackets are kept when generating HTML (demo).
As such  is equal to <img src="logo.png" alt='" "'> which is also not reported.
But I agree that this is not helpful alt text.
We could either strip known characters such as the quotes or check that the alt text has a known letter via a regular expression.
I think adding a rule like no-restricted-alt-text, as suggested in #713, or adding an option to require-alt-text to restrict which text is allowed or disallowed makes sense.
That said, as noted,  is represented in the AST with an alt-text value of "\" \"", so require-alt-text rule intentionally doesn’t report cases like this.
I think adding an option is a good idea to expand require-alt-text, right now rule is just asking to add alternate text now this option will let the users to validate that text also.
Activity
DMartens commentedon Oct 2, 2026
The quotes inside the square brackets are kept when generating HTML (demo).
As such
is equal to<img src="logo.png" alt='" "'>which is also not reported.But I agree that this is not helpful alt text.
We could either strip known characters such as the quotes or check that the alt text has a known letter via a regular expression.
lumirlumir commentedon Oct 8, 2026
I think adding a rule like
no-restricted-alt-text, as suggested in #713, or adding an option torequire-alt-textto restrict which text is allowed or disallowed makes sense.That said, as noted,
is represented in the AST with an alt-text value of"\" \"", sorequire-alt-textrule intentionally doesn’t report cases like this.Tanujkanti4441 commentedon Oct 9, 2026
I think adding an option is a good idea to expand
require-alt-text, right now rule is just asking to add alternate text now this option will let the users to validate that text also.