I have a problem with using HTML5 elements in Internet Explorer 7 and up (not testing IE6). I know that by default, IE refuses to recognize common HTML5 elements like "article" or "header" without the use of a Javascript "shiv". I've used modernizr (http://www.modernizr.com) to force IE to recognize these elements to that I can apply CSS styles to them. So far so good.
The problem now is that the application uses Javascript to fetch certain HTML fragments (containing HTML5 markup) and inserts them into the document at run-time. On all other browsers, this works flawlessly, but in IE, elements inserted at runtime can't be styled with CSS.
Here's an example of the chunk of markup that I'm injecting into the page:
<article id="block-1" class="block">
<a href="#">
<h2>Title</h2>
<p>Text</p>
<img src="http://dummyimage.com/100x100" width="100" height="100" alt="placeholder" />
</a>
</article>
I've tested my theory by replacing the article tag by a common div, which seems to solve the problem for now, at the expense of semantic markup. But I'd like to know if there are any more future-proof workarounds.