What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

I would like to suggest checking the markup of SO to uncover bugs.

No, not for accessibility or philosophical reasons, and definitely not for the sake of validation itself.

And forget the goal of producing 100% valid HTML.

I'm just talking about a sensible sanity check to catch simple mistakes before they multiply.

For example, many pages have multiple elements with the same ID value. This is likely to lead to undesired behaviour of CSS or JavaScript in at least some browsers.

share|improve this question

6 Answers 6

See also Jeff's Blog Post:

http://www.codinghorror.com/blog/archives/001234.html

share|improve this answer
1  
On this I mostly gotta agree with Jeff's pragmatism. There really are much more important things than HTML validity or whether layout is table-based or not (cf. meta.stackexchange.com/questions/24601/valid-html-and-semantics) –  Jonik Oct 5 '09 at 12:01
    
Agreed. Web Browsers are not standard compatible, and saying "i deliver valid HTML, if the browser does not support it, suck it up" is certainly the wrong approach (it's all about providing service to the user). Accessibility is the big point of course, but you can have an invalid, accessible site as well. –  Michael Stum Oct 5 '09 at 15:26

I'm bumping this as I think it's important. Actually SO's HTML is pretty clean, I only see errors about:

  • Missing ALT on images (like it's already been said, important for accessibility)
  • A <tfoot> where it's not allowed
  • Errors with <form>s missing ACTION or other mandatory attributes

So compared to other websites it's already REALLY good, I would say making the most important pages (view question, view question list, ask question, etc) validate won't take more than 1 hour of work. If you don't think following standards is important, at least do it just to make us happy and to be able to say "hey my website validates" :) It's not that much work!

share|improve this answer
1  
it's not helpful unless you indicate specifically which pages you're talking about. –  Jeff Atwood Feb 1 '10 at 7:47
1  
@Jeff: for example this very page is easily fixable. meta.stackoverflow.com has only 1 error, a missing alt on the envelope icon. It's screaming "fix me please" :) I highly suggest you get this firefox addon, addons.mozilla.org/en-US/firefox/addon/249 .. It will add a very small icon so you can tell instantly which pages validate and which don't. If you click the icon, it will list the errors. –  Andreas Bonini Feb 1 '10 at 7:53
    
we only support validation through the official W3C web validator service. We do not support random Firefox add-ons. –  Jeff Atwood Feb 1 '10 at 18:36
1  
@Jeff: the "random Firefox add-on" uses the same exact code as the W3C web validator service (which is open source). It's impossible for a page to validate in the addon and not on the web service, or the inverse, or for it to have different errors. Going to the web service for every single page is unfeasible.. For this reason the addon is invaluable. –  Andreas Bonini Feb 2 '10 at 3:34

My suspicion is that the HTML source is all ready "too far gone", and that rewriting the code to validate is going to be deemed ... (ahem) ... "more effort than it is worth"

Since we're not talking best practices and philosophy, but pure results, it's fair to say the dev team at this point is (probably) going to concentrate on actual reported problems rather than potential problems that have not been demonstrated to exist.

In other words, if it ain't (demonstrably) broke...

share|improve this answer
    
Potential bugs are corrected by preemptive action. Do you remember all the problem Opera and Webkit users were having? –  perbert Sep 23 '09 at 16:48
    
@voyager: Yes, but now we are talking speculation, no? I don't mean for my response to be a resounding endorsement of dev policy for SO, merely an observation based on the data available. –  ベレアー アダム Sep 23 '09 at 17:10

They can always clean as they go. Nothing says that the entire site needs to be cleaned in one fell swoop.

For example, I've been working on a certain high-traffic site for over 2 years to get it dragged into some sort of validation. I work when I can and slowly, slowly it is getting there.

share|improve this answer

I don't really have a problem with the "errors" here.

http://validator.w3.org/check?uri=http%3A%2F%2Fstackoverflow.com%2F

share|improve this answer

Now I found some more mistakes, probably newer than this question. These are the easy ones to be fixed:

  • Community wiki questions and answers have overlapping links in user cards:

    <div class="user-details">
        <a id="history-[post-id]" href="/posts/[post-id]/revisions" title="show revision history for this post">
        [rev-count] revs, [editor-count] users [most-prolific-user-share]%<br><a href="/users/[user-id]">[user-nick]</a>
    
        </a>
    </div>
    

    Browsers correctly close the first link before <br> and ignore the now superfluous </a>. I suggest displaying the most prolific user share info like this:

    <div class="user-details">
        <a id="history-[post-id]" href="/posts/[post-id]/revisions" title="show revision history for this post">[rev-count] revs, [editor-count] users</a>, [most-prolific-user-share] % by
        <br>
        <a href="/users/[user-id]">[user-nick]</a>
    </div>
    
  • <a name="…"></a> is obsolete in HTML5. The id attribute (ideally of the element one would like to see when linking there) should be used instead. IMO using the id attribute for linking helps keep clean code (no superfluous anchors) and meaningful IDs.

  • Ampersands in gravatar URLs (in top bar, in comments) are not properly encoded as &amp;.
  • The same problem with ampersands is in “advertising info” link in the footer.

Fixing these errors should not get top priority, but it is likely to take only several minutes and I think it’s worth them.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .