News for hackers. Stuff that matters.
Re:Top validation errors by olavk on Saturday June 16, 2012 @08:13AM (#4120465)
You indicate than an image is purely decorative by providing the attribute value `alt=""`.
Re:Top validation errors by icebraining on Saturday June 16, 2012 @08:34AM (#4120491)
Which provides no more information than no alt attribute at all.
Re:Top validation errors by DanBC on Saturday June 16, 2012 @08:53AM (#4120536)
No, it shows the author has thought about alt attributes and has included them because doing so is standards compliant.

For images that are purely decorative including an empty alt attrib is valid. People using screen readers (and people with images turned off[1]) don't need to hear (or read)"SMALL RED BULLET" for all 7 items in the list.

[1] I often have images turned off. I'm using a mobile broadband dongle. My ISP uses horrible proxies to compress images. I'm in the UK. The IP of the proxies is 1.2.3.9 through 1.2.3.12 - this is sub-optimal for many obvious reasons. Bypassing this proxy is trivial, but means I download a lot more data.

Re:Top validation errors by wazoox on Saturday June 16, 2012 @11:25AM (#4120828)
> For images that are purely decorative including an empty alt attrib is valid. People using screen readers (and people with images turned off[1]) don't need to hear (or read)"SMALL RED BULLET" for all 7 items in the list.

I typically use "-" or "*" as an alt for bullet images in text, and similar decorative markers. It seems to make more sense to me to emphasize that there's a list.

Re:Top validation errors by moreati on Saturday June 16, 2012 @09:43AM (#4120633)
I'm guessing a 3G provider other than Three or Vodaphone - said proxy is why I left T-Mobile. Last I tried you can instruct the proxy not to alter your web traffic using HTTP cache control headers e.g. http://www.lewiz.org/2007/01/hacking-t-mobile-web-proxy.html
Re:Top validation errors by DanBC on Saturday June 16, 2012 @11:04AM (#4120796)
Yes! They re-write webpages to insert a bunch of script, which re-writes all alt tags to instructions for fetching higher quality images for this or all images on the page. It is annoying. They also have a psuedo-random interstitial telling me that I'm over the "fair use" allowance.

The only reason I'm still using them is that they don't charge for MB or GB; I pay for three months and get "unlimited surfing". They block some stuff after you hit 1GB, but that's trivially easy to get around. Which I do, since they've said I get unlimited web use.

Re:Top validation errors by pornel on Saturday June 16, 2012 @08:47AM (#4120520)
No, it allows screen readers to distinguish between potentially important images with missing alt (author didn't care) and images that are known to be unimportant (author explicitly specified it).
Re:Top validation errors by kalleboo on Saturday June 16, 2012 @02:04PM (#4121171)
And requiring alt means you lose that signal, since content providers will continue to be lazy and leave the alt blank, so now all images look like they're decorative, instead of some being "we don't know".

You can't solve a social problem (content providers who don't care) with a technical limitation (required alt tags).

Re:Top validation errors by olavk on Saturday June 16, 2012 @04:22PM (#4121507)
If a content provider don't care about accessibility, why would they care about validation? They can leave out the alt-attribute whether it is required by the spec or not.
Re:Top validation errors by kalleboo on Sunday June 17, 2012 @06:27PM (#4124018)
Because they're all using wordpress/blogger/etc which put it in for them.
Re:Top validation errors by olavk on Monday June 18, 2012 @09:24AM (#4126268)
If the developers lets these tools insert `alt=""` per default with all images, then they are not in compliance with the spec.
Re:Top validation errors by kalleboo on Tuesday June 19, 2012 @07:42AM (#4131267)
But if they leave out alt="", then they won't validate. What are they supposed to do, force the user to enter text? Then you'll end up with alt="sldfjsjf".
Re:Top validation errors by olavk on Wednesday June 20, 2012 @07:54AM (#4136541)
No, it is correct according to the HTML5 spec to leave out the alt-attribute if there is no valid alternative text available.
Re:Top validation errors by olavk on Saturday June 16, 2012 @08:54AM (#4120538)
Yes it does. It provides the information that the image is purely decorative and can be ignored in a text-only representation.
Re:Top validation errors by toemetoch on Saturday June 16, 2012 @08:55AM (#4120544)
The alt field specifies the text to be shown in the container when the resource is missing. If you don't use it you'll get an eyesore in the form of a broken image icon, within a reserved space for the resource. The alt="" instructs the browser to minimize space reserved for a missing resource. This is indeed useful for layout elements that are only a few pixels on each side. This way you don't mess up layout. It's used to keep the UI usefull when things go missing.