1. 15
    1. 16

      There is another problem, too. There is no way to have the OL tag skip a number. You can’t really use the OL tag to mark up any ordered list in which the items skip a number or multiple numbers.

      <ol>
        <li>are
        <li value=3>you
        <li>sure?
      </ol>
      
      1. 12

        Legal text, like most application specific domains, are a bad fit for HTML because they have rich semantics not necessarily shared by other applications. The correct way to encode legal text is as XML, which, duh, they’ve been doing for decades: https://xml.house.gov/

        1. 7
          <dl>
            <dt>A<dd>This comment will express an approach that
              <dl>
                <dt>1<dd>Provides the definitions to section references
                <dt>2<dd>Allows manually choosing section references
              </dl>
          </dl>
          

          I find ol to be more of an array-ish thing: Expressing order in relation to other items, if its a key-value thing, dl fits the problem better.

          1. 4

            Am I blaming the rise of fascism and the downfall of Western civilization on the W3C’s pig-headed and flawed implementation of the OL tag in HTML?

            A little, yes.

            Sigh. Even if the point of the article - how OL tags are content, not presentation - would be correct, extrapolating to the entire HTML spec being broken, and then going face first into Godwin’s law is a bit much for this reader.

            1. 6

              The author was being facetious.

              1. 2

                I don’t think Godwin’s law really covers this case. The article doesn’t make an earnest comparison to nazi germany and is self-aware about the statement being hard to swallow. I take the points that HTML is in a unique position to be a democratizing technology, but due to a technicality HTML was not kept as relevant to communicating law content as it was for science, and that could have negative effects on the breadth of the audience that observes and critiques law.

                1. 4

                  HTML really isn’t that good for communicating science, either, which is why most science journals are still in PDFs. There’s still no HTML element for a footnote!

                  1. 6

                    That’s what they want you to think!

                    Footnotes exist in CSS Generated Content for Paged Media Module!

                    Which is supported by Weasyprint! (and almost nothing else!)

                    (which I found out about from ‘Laying Out a Print Book With CSS’)

                    (further aside, https://print-css.rocks/ has a list of other tools with support for such things)

                    1. 3

                      Which is supported by Weasyprint! (and almost nothing else!)

                      also in Paged.js

              2. 4

                I reckon this is a bad take.

                1. Lists are fine.

                  Let’s take at its face value claim that numbered lists are needed to facilitate references to specific items in the list. That case is covered very well by current standards. One just have to properly use them. And it goes something like this:

                  <ol>
                    <li id="item1">...</li>
                    <li id="item2">...</li>
                  </ol>
                  

                  Now, elsewhere, where you want to reference the items you need to properly link to them: <a class="list-reference" href="#item1">...</a>. And properly style the link:

                  a.list-reference::before {
                    content: target-counter(attr(href url), item);
                  }
                  

                  This way you get generated item numbering consistent though out the document. Whatever you do to the list (add items, remove them, reorder) the document still remains consistent and you don’t have to edit every single reference whenever the list changes.

                  Now, the issue of copying the generated counters is still present. It can be rectified with a little bit of JS to inline the generated item numbering. It would use the very same API that you probably saw used in most annoying cases where a website adds some sort of attribution to the copied text.

                  I believe, this is why law was brought up at all: it uses these references a lot.

                2. No list is above the law.

                  I concede though that law probably doesn’t fit into this solution neatly. The main problem with law is that numbering has to stay consistent not only across the document but also across editions. So that all other documents at all times could reference the same item in the law regardless of its edition.

                  I’m not sure what is the practice in the USA but in my country common practice is that the latest version of a particular law contains the latest edition of a changed item. Deleted items a replaced with a placeholder (e.g. “6.4.a has been removed by such and such other document”). And new items are added at the end of the corresponding level of nesting.

                  In this configuration it’s even possible to use the method proposed above.

                3. The whole argument of semantics is moot.

                  If one doesn’t like HTML ol they can invent their own custom element and style it however they want. Replicating default list style would take maybe 20 lines of CSS and there’s not that much interactivity in it to worry much about accessibility issues that might come with custom select implementation. If you want to get really fancy, you can invent your own XML schema and style it with XSLT/CSS to your heart’s content. These are all ancient (in internet years) technologies that are well supported by all modern browsers, including mobile. Shortcoming of ordered lists in HTML are very likely pretty low on the (ordered) list of reasons for the downfall of civilization. And I suspect that this might an argument made not quite in good faith.

                1. 1

                  The main problem with law is that numbering has to stay consistent not only across the document but also across editions.

                  I wonder where this idea comes from, or rather where the author of the article got it.

                  1. 1

                    The OP doesn’t directly mention it but they gesture towards the idea insisting that the main function of numbering in lists in law is actually identification.

                    I agree and I believe it’s empirically true. Many laws came into effect many decades ago. Since then many amendments were made to them but they are still standing in their current edition. At the same time particular sections/paragraphs have been referenced in external documents be it court proceedings/rulings, other laws, or a massive amount of writing about laws ranging from books, to blog posts. We don’t want to invalidate older references with every amendment we make to the law. For one, this would make it very hard to make sense of old court rulings as one would have to find a specific law edition that was in effect at the time to for it to make sense. Stable identifiers for pieces of law seem like a good idea in the pre-computer time (which is right now in the realm of law).

                    1. 1

                      That’s not how that works. Sections get renumbered all the time. This is and was the bread and butter of legal publishers.

                      1. 1
                        1. It might be in the USA, or wherever. It doesn’t seem to be the case in my country.
                        2. If it’s actually the case, then the stability/reference argument is even weaker.
                2. 3

                  The argument here is missing a rather critical step. Suppose we grant that HTML’s poor support for nested ordered lists is responsible for PDF and not HTML being the de-facto file format for electronic storage of legal documents; this has very little to do with whether those files are made accessible. A scientific paper marked up in HTML, but behind a paywall, is not any more accessible than a scientific paper compiled into a PDF, but behind a paywall. A legal code behind a login gate is impenetrable to ordinary citizens no matter how it’s stored behind that login gate. The data storage format is not the problem.

                  (Arguably, PDF is more accessible, because it’s more amenable to being printed and sent to citizens without computers.)

                  Also, can’t you just use an unordered list and put your numbering inside the <ul>? You could do more complicated things to make the numbers structurally identifiable if you needed to; the competition here is word processors, so you’re already working with WYSIWYG-like editors that obscure the data storage format.

                  1. 1

                    have an inchoate intuition that content vs appearance is a bad paradigm because it is an attempt to shoehorn a triad into a false dichotomy, and the real correct solution is separation of content vs appearance vs a third thing, maybe “functionality”

                    This is historically backwards. The rich web with a third dimension of functionality was shoe-horned into the web of html, a standard for describing documents that might be rendered on many different devices that have wildly different displays.

                    pretty much all law is structured as nested ordered lists where the ordinal numbers are assigned by government body.

                    Citation needed. Plenty of legislation over time and place is not structured as nested lists. In fact, the use of nested lists is if anything a recent innovation that came about once lawyers had access to word processors.

                    In general the numbers only matter as a cross reference internal to the same version. The numbers do change for English and US legislation, which is why you have to either use up to date books, or more likely look it up online in a database that can accommodate looking at different versions.