SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2013
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    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
    Location
    Melbourne, AU
    Posts
    24,165
    Mentioned
    453 Post(s)
    Tagged
    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".)

  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)
    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

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
  •