Reputation: 1727
I have a list of replies to topic. Each reply is with article tag and doesn't really need a title and the layout looks nice without a title. But in html5 outline test, each of the replies is a "undefined section". So I am thinking to put this in footer:
<h3>Reply-$id</h3>
Is this invalid or a bad practice of html5?
Upvotes: 0
Views: 1697
Reputation: 82976
There's a relevant thread on the W3C HTML working group mailing list at present - it starts at http://lists.w3.org/Archives/Public/public-html/2013Jan/0109.html - where the prevailing opinion seems to be that using the <article>
element for comments/replies is not helpful and the recommendation should be removed from the spec, and <ol>/<li>
recommended instead.
This would have the effect of removing individual comments from the document outline unless you explicitly provided a heading for each one.
Moving on to directly address your question, personally, I disagree with BoltClock - I think that's fine as a heading, and I don't see a problem with putting it in a footer if you believe that's where it belongs. Remember that comments/replies often cross-reference to one another via their reply number, especially when repliers don't provide a title, so to be able to find the cross-referenced reply by means of a contents list/document outline would be a useful effect. And yet the reply number is a kind of subordinate metadata of the reply, so containing it in a footer does not seem unreasonable.
However, if a user was finding the reply by cross reference via, say, a screen reader, they'd want the text of the reply to follow the heading, so in this case you should place the <footer>
before the text of the reply. There's nothing wrong with doing that, although it may negate your presentational intent.
Upvotes: 3