News for hackers. Stuff that matters.
Re:Monolith – CLI tool for saving complete web pages as a si... by slmjkdbtl on Sunday March 24, 2024 @09:35PM (#39812170)
I used to only do single file HTML pages too, until I have a page that have multiple occurrences of the same image, it's wasteful to have the dataurl string every time that img occurs. Maybe I can save the dataurl string in JS once and assign it to those img in JS, but most of the time my page doesn't have any JS it feels bad to use JS just for this.
Re:Monolith – CLI tool for saving complete web pages as a si... by csande17 on Sunday March 24, 2024 @10:48PM (#39812464)
You could use the <use> element in an inline SVG to duplicate the same bitmap <image> to multiple parts of the page.
Re:Monolith – CLI tool for saving complete web pages as a si... by slmjkdbtl on Monday March 25, 2024 @06:25AM (#39814485)
Interesting, I'll try that later. But I guess that won't have some useful attributes on <img> like "alt"?
Re:Monolith – CLI tool for saving complete web pages as a si... by oneeyedpigeon on Monday March 25, 2024 @07:35AM (#39814980)
I found [this suggestion](https://stackoverflow.com/questions/4697100/accessibility-re...), although it's pretty old. Maybe screen readers have made improvements to this scenario in the last few years?

    <svg role="img" aria-label="[title + description]">
        <title>[title]</title>
        <desc>[long description]</desc>
        ...
    </svg>