Proposal: <more> element inside <ul>, <ol>, <menu> (or possibly also inside some other elements) #10279
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
What problem are you trying to solve?
HTML restricts certain elements to only contain specific other elements or only appear within particular elements. Sometimes, when developers want to semantically indicate that a parent element has the capability to expand and collapse, there is a lack of tags that can express this expand and collapse semantics.
What solutions exist today?
No response
How would you solve it?
For example, when I want to indicate that the content of a
<ul>
is expandable, I have to end up writing code like this:or like this:
As you can see, the item with
<button>
is not semantically of the same conceptual level as the others.Or there's a "
<button>
outside" solution:However, this doesn't relates the
<button>
to the list closely(although we can relate them by accessibility attribute such asaria-controls
, butmore
is plain text, and still doesn't have native semantics like<details>
and<summary>
). Moreover, the<button>
needs to be deemed as a necessary part of an expandable list(or an expandable context menu etc.). Putting it outside makes the structure weird, especially when themore
indicator is visually very tight with the list(or menu), consider the following code:Anything else?
I suggest adding a
<more>
element, which can enhance the semantic meaning of the document. Compared to using tags like<li>
or an element outside to indicate that the content is not fully displayed and there is more to come, the<more>
element has a clearer semantic meaning. The<more>
can be further divided into two sub-types of semantics:===
<more>
empty:The text was updated successfully, but these errors were encountered: