W3C tool says 65 errors; how do I correct them?

  • Unknown's avatar

    I’m starting this new thread, which I hope is okay; this question had been posted to a thread about mp3 buffering that was getting long and old. timethief made me aware of the W3C validation tool, which indicates I have 65 errors; big number, but it breaks down to 5 categories, below. Correct me if I’m wrong, but I assume the only way to correct these errors is to edit each affected post individually. FYI, I don’t really know anything about writing HTML code, I just make my posts in “visual” mode, using “add image” or “edit link”; The only code I “write” is when I type [audio=X], putting the mp3 location in the X to create an audio player, and I have quite a few of those on my site, and they seem to be the cause of one of the categories, “ID X already defined”:
    When it says “An ‘id’ is a unique identifier. Each time this attribute is used in a document it must have a different value”, does that mean that I should go in and rename them as ‘audioplayer2, 3, etc? :
    Line 263, Column 206: ID “audioplayer1” already defined .
    …yer.swf’ width=’290′ height=’24’ id=’audioplayer1′><param name=’movie’ value=
    Line 72, Column 206: ID “audioplayer1” first defined here .
    …yer.swf’ width=’290′ height=’24’ id=’audioplayer1′><param name=’movie’ value=

    The next error category is “required attribute X not specified”: these are all hotlinked photos that I linked, in Visual mode, using “add image”. It seems to be telling me that some attribute “alt” is not specified, and it should be after border, height and width:
    …border=”0″ height=”219″ width=”445″ /></p>

    Next category is “element X undefined”: this seems to apply to all my YouTube embeds, which I’ve done following the site instructions: I copy and paste the YouTube embed code, and then WordPress shortens it, into something like so:
    [youtube=http://www.youtube.com/watch?v=FaHuzkyurC0&rel=1]

    Could all these code errors be the result of the (gulp) browser I’m using at the time?

  • Unknown's avatar

    Don’t worry about the W3C validation, it only helps developers to check whether the code is compliant to the declared (x)html version. Some themes here at wp.com don’t validate, some widgets add invalid code.
    Specifying the alt attribute in images is a matter of usability, because it helps people who can’t see the images (for whatever reason) know what they are about. It gets added if you fill in a text in the description field.
    The browser does not have anything to do with it.

  • Unknown's avatar

    Nonetheless, it did help me find some errors in my widgets that I could correct, even if my theme isn’t compliant. (Themes are getting better btw.)

  • Unknown's avatar

    jennifer, it helps, yes, if you know how to use the information and to make a distinction between those errors which affect presentation and those simply considered “errors” because they are not compliant to the dtd declaration. Many browsers (most of them, especially in the past) do not implement W3C standards completely or do display certain elements differently. So you can get a standard compliant page or site which still doesn’t show properly in one browser or the other (or, more often, the other way round); if you have little experience with (x)html the errors and warning might be more confusing than helpful.
    And, yes, I noticed, themes at wordpress.com are getting better (I always try a validation when I test a theme for reviewing on my blog).

  • Unknown's avatar

    Thanks for the insight; I might just add descriptions to the photos on a ‘catch as catch can’ basis. But what about the audio player errors? That’s a bigger issue for me, as I have a lot of them and many buffer incessantly (with little rhyme or reason compared to the ones that don’t, as far as I can see). Should I go in and manually renumber each player? Or will that make no difference (or worse, potentially make things worse)?

  • Unknown's avatar

    djeddieo, you cannot renumber anything, but you should check your links: endless buffering might mean that the mp3 file is not there where the link is pointing at (the first 3 work, by the way).

  • Unknown's avatar

    As tempted as you may be, try not to validate it yourself. It’s just too much work. If you’re using XHTML:
    1. go to right bottom of page to Validate XHTML. Scroll down to validate XHTML files with W3C. Put in the address of your wordpress blog. Mine is http://www.exampledomainname.com/index.php

    1. click validate
    2. after all errors come up select show source, validate error pages, clean up markup with HTML Tidy.
    3. Revalidate

    It gives you a third party code that is supposedly more tidy than yours. Scan the code and see how it looks compared to yours and save it in microsoft word. Add piece by piece to your page and view it in your browser. Make sure your page is the way you want it to look.

    I tried this on one site and it compromised the way my page looked so I reverted back to the non transitional code. W3C doesn’t make any guarantees so make sure you can revert back to your old page. The validation tool is just to let your visitors know you took the time out to actually work on your page. Plus it will make you feel nice :)

  • Unknown's avatar

    Since we don’t have access to our templates here on wordpress.com, make sure you understand and backup what it is you are changing before you change it. We only have access to post and page codes-the content, not the markup.

  • Unknown's avatar

    isadora: thanks for your help; my first 3 audio players aren’t working for me in IE-7, Firefox or MSN (which I’m told is basically IE-6), so I always wonder if visitors are having issues. If they work for you and not for me, I don’t know what to check.
    dubaistartups: I’m afraid to ask, but “go to the right bottom” of WHAT page? I’ve just been clicking on the link that timethief gave me [http://validator.w3.org/check?uri=http%3A%2F%2Fdjeddieo.wordpress.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0] and it says 65 errors; if I select show source, validate error pages, clean up markup with HTML Tidy, and click Revalidate, it says “Failed validation, 65 Errors”. I like the way my page looks, I’m just not sure that visitors can use the players.

  • Unknown's avatar

    djeddieo, you cannot “clean up” the template code, because wordpress.com users don’t have the possibility of changing the template code.
    I tried with firefox 2.0.0.11, but the browser ist IMHO not the problem: links can be only right or wrong; if they work, they are right. In order to check them you simply have to paste them in the address bar of your browser: if the link is not ok, you will get a 404 error, otherwise the file. Maybe the files are heavy or your connection slow, or the server where you uploaded them is slow?

  • Unknown's avatar

    as long as they work for you and others, I feel relatively confident that they work for visitors to my site. Why they don’t work for me is a mystery, but not a critical one. thanks.

  • The topic ‘W3C tool says 65 errors; how do I correct them?’ is closed to new replies.