You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTML spec does not allow paragraphs to nest or have non-flow content.
MN XML allows paragraphs to nest. It allows paragraphs to have non-flow content, such as notes or footnotes or lists (which in turn can have more block content and paragraphs within).
Notably, and confusingly, both Metanorma and HTML preferred to call the paragraph <p>. Since Metanorma doesn’t call, say, notes <n>, I suppose either
Metanorma decided to mimic HTML tag naming, but made the behavior of the tag inconsistent with HTML (confusing), or
Metanorma decided to be randomly inconsistent in its element naming just for paragraphs, and accidentally collided with HTML naming (unlikely).
Not using paragraphs, but just divs, is not recommended for accessibility (and SEO, Web semantics, etc.) reasons. While there is now an ARIA role “paragraph” (which MDN does not recommend to use in favour of native tag), it is not quite clear how nested paragraph content is handled according to ARIA: most docs I could find simply describe this role as “a paragraph of text”; meanwhile, we know that screen readers etc. have special provisions for navigating between paragraphs, and it’s unclear whether nested non-flow content would interfere with such.
There are some options:
Use a custom tag (or a plain div) with role=paragraph.
This would require either YOLOing accessibility or testing paragraph handling with actual screen readers and other non-human HTML consumers.
Move non-flow content out of paragraphs. Paragraphs can be split at non-flow content.
This would break 1:1 mapping with Metanorma structure, which is not great but not a terribly big deal if we don’t need two-way transformation between Firelight resource structure and MN XML (which we don’t per one of my discussions with Ronald).
Split paragraphs would have adjusted IDs with sequential index appended.
There was a concern raised about indicating where the nested block belongs, but I believe it is a non-issue: MN XML is a order-important sequential document, and belonging of things together is based on order. (One litmus test to prove this is: if you try reordering items in a Metanorma XML representation of a standard, it will stop making sense.)
The current approach is the second one, and it works so far, but I am open to arguments.
The text was updated successfully, but these errors were encountered:
HTML spec does not allow paragraphs to nest or have non-flow content.
MN XML allows paragraphs to nest. It allows paragraphs to have non-flow content, such as notes or footnotes or lists (which in turn can have more block content and paragraphs within).
Notably, and confusingly, both Metanorma and HTML preferred to call the paragraph
<p>
. Since Metanorma doesn’t call, say, notes<n>
, I suppose eitherNot using paragraphs, but just divs, is not recommended for accessibility (and SEO, Web semantics, etc.) reasons. While there is now an ARIA role “paragraph” (which MDN does not recommend to use in favour of native tag), it is not quite clear how nested paragraph content is handled according to ARIA: most docs I could find simply describe this role as “a paragraph of text”; meanwhile, we know that screen readers etc. have special provisions for navigating between paragraphs, and it’s unclear whether nested non-flow content would interfere with such.
There are some options:
The current approach is the second one, and it works so far, but I am open to arguments.
The text was updated successfully, but these errors were encountered: