SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2011
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What does accessifyhtml5.js do?

    Hello,

    I'm not sure what https://github.com/yatil/accessifyht...README.textile does.

    Does it automatically add roles to elements? Or does it let you use CSS declarations such as [role="banner"] {...} ?


  2. #2
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi!

    It automatically adds roles to the elements. It is meant as a polyfill until browsers adds those landmark roles by themselves.

    It doesnít enable CSS3 selectors in browsers who donít support them.

  3. #3
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,276
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Since they're landmark roles (rather than regular roles), how do you make sure there aren't too many added? (for example, if someone has <header>s in articles and there are several on the page, you'd only want "banner" on the main page <header>, etc)

    (yeah I dunno if I dare try to read the jquery lawlz, not my strength)

    I see it says "only once per page"... is it using HTML5 document outline to see where those header and footers are?

  4. #4
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    Since they're landmark roles (rather than regular roles), how do you make sure there aren't too many added? (for example, if someone has <header>s in articles and there are several on the page, you'd only want "banner" on the main page <header>, etc)
    You can set the ids of the header and footer which are the main ones. This is the only chance to do it and a bit of a hack. Iíd recommend to add banner and contentinfo roles directly to the HTML in any case.

  5. #5
    SitePoint Zealot
    Join Date
    Jul 2011
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •