Open charlie-yao opened 1 year ago
Though browsers might let us get away with it anyway, some HTML elements only allow certain kinds of content. For example, <button> allows:
<button>
Phrasing content, but there must be no interactive content descendant and no descendant with the tabindex attribute specified.
(See: https://html.spec.whatwg.org/dev/form-elements.html#the-button-element)
It might be nice to add helper types to enforce these rules, especially for the sake of accessibility.
Though browsers might let us get away with it anyway, some HTML elements only allow certain kinds of content. For example,
<button>
allows:(See: https://html.spec.whatwg.org/dev/form-elements.html#the-button-element)
It might be nice to add helper types to enforce these rules, especially for the sake of accessibility.