News for hackers. Stuff that matters.
Re:Front-End Checklist by seanwilson on Wednesday October 18, 2017 @04:37PM (#15502770)
Why? It shouldn't make any difference if you add alt="" to the img tag.
Re:Front-End Checklist by jinglebells on Wednesday October 18, 2017 @04:45PM (#15502847)
Because you shouldn't be using <img> tags for layout. Nobody does.
Re:Front-End Checklist by seanwilson on Wednesday October 18, 2017 @04:49PM (#15502914)
What's the reasoning behind such a rule?
Re:Front-End Checklist by ozaark on Wednesday October 18, 2017 @04:56PM (#15502988)
Style is separate from content. ie. Screen readers/robots don't care about gradients etc.
Re:Front-End Checklist by seanwilson on Wednesday October 18, 2017 @05:23PM (#15503268)
I'm not seeing any practical benefits mentioned so this sounds like dogmatism to me. Using an img tag can sometimes just be more practical (e.g. if you're using a CMS or for use with a JS plugin). Google Image search definitely cares about images as well. I agree separating style from content has benefits but doing this at all costs isn't worth the time in my opinion and a few img tags seem harmless to me. It reminds me of how people are against JSX on principle that code and HTML should never be mixed without attempting to consider any of the benefits.
Re:Front-End Checklist by ozaark on Thursday October 19, 2017 @12:13PM (#15509171)
Practical benefit: users and search engines parse the content of the page for information about the subject matter, including Google Images. I agree having an img with an empty alt tag is OK, but it's not helping search optimization and neither is alt=round corner gradient (unless of course that is your subject matter :-)

Imagine reading a printed text page about dogs and peppered throughout the text was mentions of 'bezel flare 2' or similar. If it doesn't make sense for that to be on the page as text alone then it shouldn't be on the page at all.

Re:Front-End Checklist by seanwilson on Thursday October 19, 2017 @02:18PM (#15510252)
It just doesn't sound significant to me. Crawlers and screen readers happily ignore div and span tags that add nothing to the content, they ignore mobile scaling meta tags in the head etc.
Re:Front-End Checklist by ozaark on Thursday October 19, 2017 @02:53PM (#15510580)
> they ignore mobile scaling meta tags in the head

Actually the meta viewport "Helps Google’s algorithms accurately assign indexing properties to the page rather than needing to signal the existence of corresponding desktop/mobile pages." [1]

Every bit of code on a page is interpreted a certain way for a reason. HTML5 now has more semantic tags like header and nav that add an additional layer of certainty over context. I'll concede that most developers seem to not care about the reasons why so long as they can push code to production faster.

[1] https://developers.google.com/search/mobile-sites/mobile-seo...

Re:Front-End Checklist by rimliu on Friday October 20, 2017 @07:13AM (#15514857)
So sad http://www.csszengarden.com/ is already forgotten :(
Re:Front-End Checklist by daviddiasfront on Friday October 20, 2017 @12:07PM (#15516877)
It is not! :) That website change the vision of CSS for lot of people.