Validate HTML

  • Posted in : Readme
  • Collin
    Participant

    For a future release, I want to request that you ensure that the theme’s html is validated per w3c standard and Google’s SEO recommendations. Thank you.

    Example:
    https://validator.w3.org/nu/?doc=http%3A%2F%2Fthemes.pixelwars.org%2Freadme-wp%2F

    serkan
    Moderator

    Thanks for the feedback.

    Collin
    Participant

    Many of the issues I was seeing were finicky issues with shortcode implementation. By trial/error, though, I found the best way to use shortcodes in a way that would not add an extra invalid p tag at the end of the generated divs for things like “accordion” and “event”.

    There are a few role-related HTML5 warnings that some may or may not choose to fix. I prefer everything to be up to modern standards, so I fixed them in my child theme. https://github.com/collinbarrett/collinmbarrett

    One major issue that I hope the developers will fix in a future update is that in blog-regular_sidebar.php (and likely other blog types) as well as post_other-feat_img_no_sidebar.php (and likely other post types), the ul for pagination is rendered way too soon up in the head. HTML5 assumes elements that should be in the body automatically open the body tag. Therefore, the rendered close head and open body tags by the theme are ignored and invalidated since body is automatically opened way up above when the ul for pagination is created. It’d be great if this is fixed, but this is beyond the scope of what I want to monkey around with in a child theme. This causes lots of other invalidation errors as links to stylesheets, etc. are seen by the browser as being in the body when they should be and were intended to be in the head.

    Overall, though, this theme does seem to be very well coded except for that one big issue. Thanks.

    ahmetsali
    Keymaster

    Hi Collin,

    – we will fix the validation errors as we can

    – role attributes are there for aria and accessibility;

    http://stackoverflow.com/questions/10403138/what-is-the-purpose-of-the-role-attribute-in-html

    – i just run validation on blog regular with sidebar page, and i can’t see the (ul markup outside body tag) issue;

    https://validator.w3.org/nu/?doc=http%3A%2F%2Fthemes.pixelwars.org%2Freadme-wp%2Fblog%2F%3Fblog_sidebar%3Dyes

    Collin
    Participant

    Thanks for the prompt response as always. I understand the role issue, and it’s just a warning, so that’s understandable and probably correct.

    The ul issue, I think, is because I tried to fix an invalidation issue with the numbered blog pages. See issue 3 here: https://validator.w3.org/nu/?doc=https%3A%2F%2Fcollinmbarrett.com%2Fblog I tried to fix it just by removing rel=”last”, but that spawned a visual error on my site as well as I think those other ul issues I had reported, so I rolled that attempted fix back (https://github.com/collinbarrett/collinmbarrett/commit/5ad37b1c2b8138e2a266e8a25c2951d66794d396) and no longer see the ul errors. Sorry for the false report on that. Is there a way to fix that rel=”last” invalidation error (issue 3 in my example link above) when using numbered blog pages as opposed to just next/previous?

    Collin
    Participant

    I also noticed that h1 is used for page titles as well as blog post titles on the blog pages. This throws validation warnings as screen readers would flag these as being the same level when really the page title should be h1 and the blog post title (on the blog page) should probably be an h2. On single post pages, though, the blog title should be h1 as it currently is. Fixing this would probably require a fair amount of CSS refactoring, though.

    ahmetsali
    Keymaster

    – ok, I see the validation errors when turned numbered pagination on, we will also fix this too,

    – with html5 it is ok to use multiple h1 tags with sectioning elements;

    http://webdesign.tutsplus.com/articles/the-truth-about-multiple-h1-tags-in-the-html5-era–webdesign-16824

    Thanks for the feedback.

    Collin
    Participant

    ok, thanks for the html5 update, i am still getting up to snuff on that.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register