Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You indicate than an image is purely decorative by providing the attribute value `alt=""`.


Which provides no more information than no alt attribute at all.


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.


> 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.


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


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.


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).


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).


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.


Because they're all using wordpress/blogger/etc which put it in for them.


If the developers lets these tools insert `alt=""` per default with all images, then they are not in compliance with the spec.


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".


No, it is correct according to the HTML5 spec to leave out the alt-attribute if there is no valid alternative text available.


Yes it does. It provides the information that the image is purely decorative and can be ignored in a text-only representation.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: