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
The image_alt rule does not seem to work inside Django template blocks. This seems very similar to #28, but since it's a different rule I wanted to open a separate ticket.
Which terms did you search for in the documentation and issue tracker?
$ curlylint --rule 'image_alt: true' template.html
template.html
3:5 The `<img>` tag must have a `alt` attribute, either with meaningful text, or an empty string for decorative images image_alt
Oh no! 💥 💔 💥
1 error reported
Thank you @360cid, I wouldn’t be surprised if this was indeed the same issue as #28. Currently it’s not ideal that each rule implements its own parsing of the template’s AST, so it leads to issues like this.
Describe the bug
The
image_alt
rule does not seem to work inside Django template blocks. This seems very similar to #28, but since it's a different rule I wanted to open a separate ticket.Which terms did you search for in the documentation and issue tracker?
Image_alt, image, alt tag, django
Environment
MacOS Catalina 10.15.7
Steps to reproduce
template.html
:image_alt
enabled:Expected behavior
Actual behavior
The missing alt attribute is reported correctly when the
img
tag is moved out of the block.The text was updated successfully, but these errors were encountered: