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?

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

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.