According to the spec nothing suggests that you cannot use the section
tag inside an ol
.
The section element represents a generic section of a document or
application. A section, in this context, is a thematic grouping of
content, typically with a heading.
Examples of sections would be chapters, the various tabbed pages in a
tabbed dialog box, or the numbered sections of a thesis. A Web site's
home page could be split into sections for an introduction, news
items, and contact information.
Reading this your usage of section
inside an ol
seems to be fine.Besides using the w3.org's HTML5 validator does not give any errors. I would take this with a grain of salt. And according to MDN's usage notes
Usage notes
- Each should be identified, typically by including a heading (- element) as a child of the element.
- If it makes sense to separately syndicate the content of a element, use an element instead.
- Do not use the element as a generic container; this is what is for, especially when the sectioning is only for styling
purposes. A rule of thumb is that a section should logically appear in
the outline of a document.
To your first question, yes the section element alone will guarantee that their order matters. According to this
The section element is a generic semantic element, that can be used to
combine portions of a document together into discrete units that are
related in some way. For example, the section element may create items
inside an outline of a document, or divide page content into related
pieces (like an Introduction) followed by some background information
on the topic.
Some examples of usage are given following. The section element can be
applied to each individual section of a tab switcher or content slider
(if an unordered list is not needed). The section element can also
divide a lengthy "terms and conditions" (or similar) page into
numbered sections. Furthermore, section elements can divide the
different sections of a one-page website or portfolio. A common use
offline could be to denote the chapter of a book.
This does indicate that the section item can be used to denote order/flow of a document. Which I think would guarantee that the order matters.
reference - HTML5, <section> inside unordered list
Don’t worry too much about the semantic considerations — they’re
necessarily fuzzy.