Live data from Hacker News

Front-End Checklist

github.com

41–50 of 82 posts

Re: Front-End Checklist

#42

> Alternative text: High All have an alternative text which describe the image visually. Please don't do that. Don't put an alt on ALL images. Screen readers will read all of them. Skin and flavour images don't deserve to be read outloud. Nobody wants to hear "bottom left corner of logo" or "rounded corner".

Seconding this. It very much depends on the purpose of the image. If an image or any other tag is extraneous in a screen reader context use the `aria-hidden`[1] attribute to exclude it.

A good example is an image used as an icon next to a text label. Imagine a link/button that contains the words "Save" and a floppy disk icon. There's no need to have an alt of "Save" on the icon as the text "Save" is already present. So it would look something like this:

    Save
Though in this case you'd probably be using an icon font like FontAwesome.

[1] https://stackoverflow.com/questions/31107040/whats-the-diffe...

Re: Front-End Checklist

#43
post #31

Earlier quoted context omitted.

Putting it on is better as that defines the language for as well. The lang attribute defines the language of the tree that the element is the root node of.

still, who uses it for what? browsers dont change behaviour because of it, search engines ignore it, users dont see it.

1. The main reason is screen readers. Imagine a screen reader trying to pronounce ‘Je ne regrette rien’ with an English voice, then imagine the same with a French voice.

2. I’d be surprised if search engines didn’t use it at least as a flag for content language (although I’m sure that it‘s only supplemental at best).

3. Styling based on language. CSS has a :lang() pseudoclass selector so you can do p:lang(en) { color: red; } p:lang(fr) { color: blue; } . Or tie quote styles to language based on generated content. Or most usefully adjust font metrics based on language for multilingual sites (typically you’d want to boost the font size a little for Chinese or Japanese as there are less characters for same information, but each character is a little more dense).

Re: Front-End Checklist

#45
post #14

> Alternative text: High All have an alternative text which describe the image visually. Please don't do that. Don't put an alt on ALL images. Screen readers will read all of them. Skin and flavour images don't deserve to be read outloud. Nobody wants to hear "bottom left corner of logo" or "rounded corner".

This recommendation would be fine 20 years ago. You should not have any decorative images in your markup, they belong to CSS.

Some people like myself work in places where there are still some clients that ask for IE6 compatibility and have to comply with WCAG 2.0 accessibility standards.

Re: Front-End Checklist

#46
post #31

Earlier quoted context omitted.

Putting it on is better as that defines the language for as well. The lang attribute defines the language of the tree that the element is the root node of.

still, who uses it for what? browsers dont change behaviour because of it, search engines ignore it, users dont see it.

Actually, browsers do change behavior because of it[1], and users do get affected by it[2]. Google have said last year they ignore the lang tag but they do use the hreflang attribute[3]

[1] https://www.w3.org/International/tests/repo/results/the-lang...

[2] http://accessibility.psu.edu/foreignlanguages/langtaghtml/#a...

[3] https://www.seroundtable.com/google-ignores-the-html-lang-at...

Re: Front-End Checklist

#47
post #41

Earlier quoted context omitted.

What's the reasoning behind such a rule?

Style is separate from content. ie. Screen readers/robots don't care about gradients etc.

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

#48
post #30

Earlier quoted context omitted.

Have not found the crawl rates changed for sites where everything is well linked together. Then again, these have been just small sites with a few million pages.

measurability crawling != indexing with a segmented sitemap (i.e.: one per pagetype, per namespace, ..) you get important communicated to indexed ratios you otherwise do not get. if crawling and indexing works, it works but if it doesn't you should know it (see it in google search console) and debug it (narrow it down via segmented sitemaps).

Curious if you have examples of the types of sitemaps you mentioned: segmentation, namespacing, one per pagetype etc. and the reasoning behind the variations.
Post reply on HN