WordPress.org

Ready to get started?Download WordPress

Forums

Default Theme Does Not Validate? (6 posts)

  1. xdesi
    Member
    Posted 4 years ago #

    Hi,

    I thought the WordPress Default Theme (unmodified) should validate?

    Line 34, Column 23: Attribute "role" is not a valid attribute. Did you mean "frameborder" or "scrolling"?

    <div id="header" role="banner">

    I know why this error is occuring (because role isn't part of the XHTML spec), so why is it included in the default theme, surely this theme should validate seeing as it is the default theme?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Oh - I know! And I agree that it should validate. An XHTML document shouldn't include HTML5 attributes. You want those attributes? Then create an HTML5 theme.

    Raised it in Trac as a bug only to get it knocked back on the grounds that including the role attribute "enhanced accessibility" (which is tosh when there are so many other areas where accessibility actually needs to be enhanced in WP) and that invalidity is a small price to pay for this.

    Personally, I think this is accessibility lip-service - not accessible design - which angers me just as much as inaccessible design. Grrrr...

  3. Mike Little
    Member
    Posted 4 years ago #

    Actually Roles are not HTML5 but WAI-ARIA Landmark Roles.

    And this survey here, http://webaim.org//projects/screenreadersurvey2/#landmarks shows that a significant percentage of disabled users are already using them.

    Hardly lip service. I'm a stickler for standards and validating pages, but I'm also practical, and when there is a measurable benefit to accessibility, I don't mind a couple of invalid attributes.

    Whilst WordPress needs work on accessibility on the back end, the front end is pretty accessible out of the box.

    In fact, one of only two WCAG 2.0 AAA certified sites in the world is a WordPress site (http://lflegal.com/), and a pretty vanilla one at that.

    Refs:
    http://www.w3.org/WAI/GL/WCAG20/implementation-report/results

    http://www.w3.org/WAI/GL/WCAG20/implementation-report/implementation?implementation_id=6

    Mike

  4. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    Hardly lip service

    I think it is whilst the search is problematic (try an empty search) and gallery CSS is placed within the <body> tags. The first is a significant access issue. The second a major validation and user/owner issue. Both could be easily fixed. Then there's a default template that uses px fonts with a 62% body font, no skip links, text that fails minimum contrast levels, multiple identical link texts that point to completely different resources.

    All very fixable. In this context, throwing in a few role attributes seems very bizarre to me.

  5. xdesi
    Member
    Posted 4 years ago #

    Thanks esmi + Mike for the information, you both provide interesting arguments. It does seem like a bit of a trade-off between validity and accessiblity, although we never know how a browser will interpret invalid code, unless it's one of those occasions where you know for sure you can ignore the validator, wherby this could be one.

    Although I admit I was surprised to find it didn't validate as I always though WP came out of the box as w3 XHTML/CSS valid.

    The empty search is a bit odd, re-directs me to my homepage very strange behaviour! Although in general i've read the WP search needs a lot of improvement.

    esmi I agree it seems sort of like a "pick and choose" scenario, when they could easily implement a lot more with regards to accessibliy!

  6. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    I posted a simple (but still not perfect) fix for the "empty searches" issue on http://accessites.org/site/2009/01/wordpress-empty-searches/

Topic Closed

This topic has been closed to new replies.

About this Topic