6 ms·
Top validation errors
- sohn 14y agorequired attribute "alt" not specified, 1,392,075 times. & did not start a character reference. (& probably should have been escaped as &.), 764,450 times. Two errors that make me want to kill everyone in the W3C
- leejw00t354 14y agoThis shows how well browsers handle bad HTML. It always surprises me when I make a mistake in my code and I don't notice it until I next few the source because the browser has understood what I was meant to do. I guess although this is good for the end user it isn't always a great thing for developers learning HTML if they're able to write bad HTML without ever knowing they're doing something wrong.
- pyre 14y ago> This shows how well browsers handle bad HTML It's not that hard to handle something like an <img> tag with no alt attribute.
- nodesocket 14y agoAnybody else think its a little absurd that `alt` on img tags are still required for valid HTML?
- olavk 14y agoIn HTML5, the `alt`-attribute can be left out there is no way to provide an appropriate alternative text. The spec provides the example of "a blind photographer sharing an image on his blog". In general though, the `alt`-attribute should be present. If the image is purely decorative, the value should be an empty string (although CSS rather than `img`-tags are recommended for purely decorative images anyway). The purpose of the alt-text is some text to replace the image if you are browsing without images (e.g. using lynx or a screen-reader). Empty string means no replacement text, while a missing alt-attribute could be replaced with a text saying eg. "[unknown image]". It makes sense.
- 0x0 14y agoIt's absolutely ridiculous, especially since you can get away with alt="".
- TazeTSchnitzel 14y agoNo it's not. An empty alt specifies that it's a presentational image. On the other hand, no alt is unhelpful, as you can't tell if the omission was intentional, or the developer is just lazy.
- 0x0 14y agoIs it better that the lazy developer is forced to insert empty alt="" to get the site to validate? Your argument is actually in favor of an optional alt tag. Allowing for a missing alt tag means you CAN tell the difference between an intentional empty alt, or a lazy developer missing the tag.
- TazeTSchnitzel 14y agoAllowing for a missing alt tag means developers don't even have to consider providing alt info, which is a terrible idea. At least this way they have to put something there, even if it's blank.
- 0x0 14y agoHow is it better that every single image on a page has alt="image" or alt="asdfasdf", instead of a missing alt-tag? If the alt tag was recommended - but optional - then a missing alt-tag tells you the developer didn't think about it (and who knows if the image is significant), while a present but empty alt-tag indicates the image really is decorative/insignificant. As long as the alt-tag is required, a valid site will contain alt="" all over the place, and you can't know whether that's because the site developer was lazy (but was using validating tools) or if the site developer decided to flag those images insignificant. Am I feeding a troll here? (edit: It's like the difference between an SQL NULL and an empty string.)
- DanBC 14y agoNo. Why is it absurd?
- snorkel 14y agoThe two most popular are a crock: * Required attribute alt missing: Most images are decorative, having alt is pointless in most cases. Should be optional. * & didn't start a character reference: proving this was a bad choice for an escape character to begin with
- drhowarddrfine 14y agoYou reeaallly don't know what you're talking about.
- olavk 14y agoYou indicate than an image is purely decorative by providing the attribute value `alt=""`.
- icebraining 14y agoWhich provides no more information than no alt attribute at all.
- pornel 14y agoNo, 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).
- kalleboo 14y agoAnd 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).
- olavk 14y agoIf 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.
- jaimeiniesta 14y agoyeah I too agree that the "alt" attribute should not be considered an error. Maybe just a warning. There's a separate chart for the top 100 warnings: http://w3clove.com/charts/warnings http://w3clove.com/charts/warnings
- jaimeiniesta 14y agoIt's interesting to see the validation for Hacker News: http://w3clove.com/sitemaps/check?url=http%3A%2F%2Fnews.ycombinator.com http://w3clove.com/sitemaps/check?url=http%3A%2F%2Fnews.ycom... You wouldn't tell there were so many images, would you? Should they have an "alt" attribute?
- olavk 14y agoIt is probably the up/down arrows.
- jaimeiniesta 14y agosure, it's the arrows. Should this be done with characters, instead? Maybe CSS? This would be indeed a good case of using "alt"... alt="vote up", alt="vote down"
- DanBC 14y agoThey are functional. They need an alt tag. Having [grayarrow.gif] and [graydown.gif] is sub-optimal.
- TazeTSchnitzel 14y agoWhile we're at it, we should stop using tables, too.
- mistercow 14y agoI think most of those are up/down arrows.
- viraptor 14y agoI'd be glad if they changed the format of entities to something like &non-whitespace; suddenly all uses of & on its own becomes legal and is backwards compatible
- TazeTSchnitzel 14y agoThis is one of those improvements that could have gone into HTML5. Maybe we'll see it in HTML6. It's nice how they actually made writing HTML much nicer in HTML5, even without this. The simplification of the doctype and charset (<!doctype html><meta charset=utf-8>) was really nice.
- jacobr 14y agoWhy use character entities at all when serving documents as UTF-8?
- olavk 14y agoYou need them for < > and &.
- andrewcooke 14y agowhat on earth is "mibenumid" (last entry)? googling for it shows that it's a popular name for a url query param, but i'm not sure how that's relevant (perhaps the error comes from the "&" separator in a URL not being escaped?). is it used by some popular middleware? the pages google is throwing up seem to be asp...
- x1 14y agohttp://www.iana.org/assignments/character-sets http://www.iana.org/assignments/character-sets >The MIBenum value is a unique value for use in MIBs to identify coded character sets. >The value space for MIBenum values has been divided into three regions. The first region (3-999) consists of coded character sets that have been standardized by some standard setting organization. This region is intended for standards that do not have subset implementations. The second region (1000-1999) is for the Unicode and ISO/IEC 10646 coded character sets together with a specification of a (set of) sub-repertoires that may occur. The third region (>1999) is intended for vendor specific coded character sets. However that specific error (reference to entity "x" for which no system identifier could be generated) has this message: >This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details. I notice this on one website that is using MIBEnumID: <span class="st_facebook_large" displaytext="Facebook" st_url='http://www.hardrock.com/locations/cafes3/events.aspx?locationid=108&MIBenumID Could it be that it is just throwing this error because of the unencoded ampersand? And that since it is part of some MS/ASP.net setup it is everywhere?
- mbostock 14y agoPie charts are intended to show how one constituent value compares to the whole. Since these errors are not mutually exclusive (a single page can fail validation for multiple reasons), and since the top 10 reasons constitute an arbitrary whole, they should really be using a bar chart. Um, like this: http://bl.ocks.org/2941604 http://bl.ocks.org/2941604
- jaimeiniesta 14y agoSounds good, I'll make an alternative version using bars.
- jaimeiniesta 14y agoThanks Mike, I've updated the charts. It really looks better as a bar chart: http://w3clove.com/charts/errors/bar http://w3clove.com/charts/errors/bar
- ehutch79 14y agouh, forge tthe alt, should the no closing img tag be on the list? or not closing br? i've never used those, ever. they make no sense.