WordPress.org

Ready to get started?Download WordPress

Forums

Content Headings Tree
HTML5 compliant (2 posts)

  1. crysman
    Member
    Posted 1 year ago #

    Hi,
    since A NAME is obsolete in HTML5 (citing W3Cvalidator:)

    The name attribute is obsolete. Consider putting an id attribute on the nearest container instead.

    Could You please release a HTML5 compliant version (meaning using id attribute)? Ideally as a plugin (shortcode, too) option.

    Thanks a lot
    [ Signature moderated. ]

    http://wordpress.org/extend/plugins/content-headings-tree/

  2. crysman
    Member
    Posted 1 year ago #

    hmm... since in HTML5 you are forced to use id attribute of some container, there is a risk of duplicate id.

    Let's say Your plugin adds the id's to every Hx tag with its "safenamed" name like this:
    <h2 id="my_amazing_title_">My Amazing TITLE!</h2>

    OK, but what in case the page contains a heading like "calendar" and somewhere in the page there is also some <div id="calendar">...</div>... hups! Now we are having a duplicate id... that's not good.

    Also... How to solve the stupid behaviour of browsers scrolling too much down? If you go to bookmarked heading, the browser (newest Firefox) scrolls below the heading, so you actually don't see it... Maybe just add some little 1em scroll-up via Javascript (jQuery)? I don't know...

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags