SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2013
    0 Post(s)
    0 Thread(s)

    Defining modal structures using Html5 elements

    I'm pretty inexperienced as far as html goes and even less so with html5.

    I have a question regading modal popups - page sections that are interacted with using javascript/ajax. These are not generally in the main html flow - I might for instance place all my modal code at the end of the page for maintainability. The question is - should I be declaring these chunks of the page as sections, or something else?

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Melbourne, AU
    448 Post(s)
    8 Thread(s)
    HTML5 is pretty vague about the uses of <section>, <article>, <aside> and so on, so it's up to you, really. To me, though, items like that are good candidates for <article>, as that element is for distinct items that have a life of their own, so to speak. (Think of "article" in the sense of an "item" or "entity", like "an article of clothing".)
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    50 Post(s)
    2 Thread(s)
    They be working on an actual dialog element. I think until then you can choose whichever markup you want: if you're sectioning the heck out of every chunk, then I suppose a dialog would also be one too. If not, then not.

    Modal dialogs are a pain in the butt to make accessible for screen reader users and stuff like Dragon, so a native element would be sooooo nice.

Tags for this Thread


Posting Permissions

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