Now. Why am I wrong for Libre

  • JackbyDev@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    7 hours ago

    Nahhhh, you gotta think outside the box. You can tell people section 3, subsection 2, etc. even without pages. I’m addition, check this out. https://en.wikipedia.org/wiki/HTML_element#Anchor Click that. See the little but at the end? #Anchor? We can already use URI fragments to link to specific sections.

    “But JackbyDev, I’m not linking to a specific section of something in an outline, I need to link to a specific part of long form content, like a novel. I can only do that with pages.”

    That’s a good point, but modern browsers have a way to deal with that too. This is where text fragments help: they allow the link author to have full control over what text to link to, without requiring any special markup in the target document. You can use #:~:text= to link to specific blocks of text.

    Edit: Lemmy is reformatting that for some reason and makes it not work. Try copying and pasting the below for a working example.

    https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Fragment/Text_fragments#%3A%7E%3Atext=This+is+where+text+fragments+help%3A+they+allow+the+link+author+to+have+full+control+over+what+text+to+link+to%2C+without+requiring+any+special+markup+in+the+target+document.

    Edit 2: Apparently Lemmy reformats links in preformat snips. Amazing. 🫩 Maybe slap this into the URL bar en-US/docs/Web/URI/Reference/Fragment/Text_fragments#:~:text=This%20is%20where%20text%20fragments%20help%3A%20they%20allow%20the%20link%20author%20to%20have%20full%20control%20over%20what%20text%20to%20link%20to%2C%20without%20requiring%20any%20special%20markup%20in%20the%20target%20document. after pasting https://developer.mozilla.org/ Nothing more frustrating that trying to show people a very cool and useful feature of browsers only for a different tool to just ruin it.

    • squaresinger@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      edit-2
      2 hours ago

      I think you just proved my point.

      None of that is nearly as simple and accessible to non-techy people as page numbers. A page number would also not have been scrabled by Lemmy.

      (I of course do know about link anchors and all that, but it’s just a hassle to use.)

      • JackbyDev@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 hours ago

        No, that’s a Lemmy bug. If it’s screwing up URLs like that it could affect other URLs too. Not a bug of text fragments. Text fragments are still relatively new. Firefox only began supporting them last year. Annoyingly, to create then in Firefox you still need to go into about:config or use an extension. But still, the idea that we should favor paginated format just because you can say “page blah” when we have better ways is foolish. Saying “Search for the phrase ‘blah blah blah’” works equally well without text fragments.

        And yes, it’s annoying that anchor links are too difficult to link to. But again, the idea that we should accept all the baggage of paginated formats just because anchors tend to be done incorrectly is foolish as well.