• Resolved brylee

    (@brylee)


    I’m using the default Kubrick-based theme and decided to validate it on a whim after I upgraded from 2.7. It gives me this one error:

    Line 33, Column 23: Attribute “role” is not a valid attribute. Did you mean “frameborder” or “scrolling”?
    <div id=”header” role=”banner”>

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the “Strict” document type with a document that uses frames (e.g. you must use the “Transitional” document type to get the “target” attribute), or by using vendor proprietary extensions such as “marginheight” (this is usually fixed by using CSS to achieve the desired effect instead).

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

    Of course the doctype’s still XHTML transitional and I’ve only edited my files to include author names next to post times. I looked up the role attribute and see that it’s considered a valid part of transitional. Any ideas what caused this? Do I need the banner role declaration? Forgive my stupidity but I know very, very little HTML/CSS stuff. Oh, and I deactivated all my plugins and rechecked just in case–problem persisted.

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The role attribute isn’t actually in the XHTML DTD yet (although it is part of the HTML 5 spec. It’s only at the Working Draft stage, so, ideally, it shouldn’t be included in an XHTML page just yet. But, that said, it shouldn’t cause any real harm if you don’t want to edit header.php and remove role="banner".

    But… baaad Michael. Jumping the gun like that… 😉

    Thread Starter brylee

    (@brylee)

    Oops, I must have really skimmed over the info on “role.” My bad for saying it’s part of the spec. Thanks for the quick help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Default theme won’t validate after 2.8 upgrade’ is closed to new replies.