• Resolved gentid

    (@gentid)


    Hi,
    I have validated my site using W3C and one of the errors was this…

    Line 191, Column 166: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
    …p-vask.dk/wp-content/uploads/2013/10/cartoon.png&width=1000&height=300″ /><div

    I know that this file is generate by wp but I want to know with which file this has to do?

    Thanks in advance

Viewing 9 replies - 1 through 9 (of 9 total)
  • graphicscove

    (@graphicscove)

    Hello gentid,

    This seems like an image you’ve uploaded in the admin and forgot to add an alt tag to it. If you find the page you validated in the admin search the content for cartoon.jpg and add alt=”cartoon image” (Or whatever you require). This should fix your validation error.

    Thread Starter gentid

    (@gentid)

    Hi graphicscove,
    thank you very much for your repsone but the file that I validated is the homepage and it automatically generated by wordpress and it cant be found in cpanel. Any other ideas?

    Thank You

    graphicscove

    (@graphicscove)

    You wont find this in cPanel. This will more than likely be in your wordpress admin under ‘pages’. Do you have a page called ‘Homepage’?

    Thread Starter gentid

    (@gentid)

    Yes, I have.

    Thread Starter gentid

    (@gentid)

    but there is no cartoon.jpg there.

    Thread Starter gentid

    (@gentid)

    yes, sorry, again many thanks for the help, it was correct, I edited the plugin code and I resolved 33 Error from 44.

    Now can you take a look plz at the others. Here is the link.
    https://validator.w3.org/check?uri=http%3A%2F%2Fdamp-vask.dk%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&group=0&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices#line-48

    It would take me too long to go through all of them, and anyway any code edits would be overwritten at the next theme update.

    But the interesting one is the 7th which is the start of it all going wrong and validation halting. The error is:

    An <a> start tag seen but an element of the same type was already open.

    The a tag that’s starting is the one for “Cartoon” and the one that is already open is a few lines higher at line 169 for the header image. You don’t have a header image in your page design, and twentyeleven is failing to close the a tag around the non-existent header image. Markup shouldn’t have 2 a tags open at the same time. It works because browsers are tolerant, but it won’t validate.

    Consider updating your theme from version 1.5 to the current version 1.9. Maybe that bug has been fixed. Otherwise you may need to setup a 1px square white header image to force twenty eleven to close the a tag round it. Validation should then proceed beyond line 197.

    You could be at it a long time to fix all these validation errors. I haven’t seen many sites that validate cleanly.

    Thread Starter gentid

    (@gentid)

    Ok, thanks very much again, really appreciated.
    Now I’ve fixed some more, there are only 7 left.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Fix W3C Validation Error on Twenty Eleven’ is closed to new replies.