You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/12/06 20:44:42 UTC

[GitHub] [netbeans] Chris2011 commented on pull request #4485: Add HTML rule and hint+fix for missing alt attribute for tag img, applet and area

Chris2011 commented on PR #4485:
URL: https://github.com/apache/netbeans/pull/4485#issuecomment-1339983996

   @matthiasblaesing after long thinking about this again I would disagree with the consistency. The warning/error/hint is really for the tag as you also see that the tag is highlighted when a div is around. So the hint shows it exactly for line + columnStart + columnEnd. For example if you have this example:
   
   `<div><img src="" /></div>`
   
   I really don't want to have the fix inside the div which is correct on this position. So the fix should really inside of the img tag not everywhere else.
   
   Maybe the problem here is that the hint on the sidebar has an other expectation for the user.
   
   Here are some other things:
   * I checked the HTML validator it also selects the img tag, I mean you have all the information from that.
   * I checked VS Code. They have no light bulb hardcoded on the sidebar so they just underline the img tag. The light bulb comes up when I set the cursor after `<|`.
   * I checked WebStorm, it treats the missing alt attribute also as warning, but they don't show the warning as a light bulb and I also can't switch this. The light bulb also appears just after I set the cursor on `<|`.
   
   So all in all, I think how NetBeans treats and shows warnings, is not optimal but this is not what I want to fix here. I also changed from warning to suggestion on current line, but the problem here is the highlight disappears too and the "suggestion"  is just seen in the statusbar BUT it just appears also on the img, not on the whitespace tokens before the tag_open_symbol. Hope that explains a bit more. I will just fix also a multi line img which makes sense to have the fix there too but not for the whole line. This will be a hole new topic IMHO.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists