nuqayah.bsky.social
@nuqayah.bsky.social
AI agrees that the div should not have an aria role in this case

chatgpt.com/share/692314...
November 23, 2025 at 2:05 PM
The content is dynamic, so buttons are added at run time, not compile time.

bsky.app/profile/nuqa...
AI returns `text[#ref ...]`. I post process the AI response, and replace `[#ref]` with `<button data-ref="">...</button>`

Then I listen to click events on the container, and if e.target.matches(data-ref) I process it accordingly.

Is there a better way?

I'm replicating what ChatGPT does.
November 23, 2025 at 2:02 PM
AI returns `text[#ref ...]`. I post process the AI response, and replace `[#ref]` with `<button data-ref="">...</button>`

Then I listen to click events on the container, and if e.target.matches(data-ref) I process it accordingly.

Is there a better way?

I'm replicating what ChatGPT does.
November 23, 2025 at 12:57 PM
I do indeed have that. svelte-check doesn't read vite.config afaict.
November 23, 2025 at 12:52 PM
(I need to figure out how to tell svelte-check to ignore a11y_no_static_element_interactions)
November 23, 2025 at 12:43 PM
No it shouldn't be. I moved to markdown-exit. Same end result for now (140kb / 40kb min/gz). Even though it doesn't say that it explicitly supports streaming.

github.com/serkodev/mar...
November 23, 2025 at 12:42 PM
Yes, it's dynamic ai content that is interactive.

I'm posting this so others don't fall in the same mistake. With more reliance on AI, especially to fix lint warnings, we must be careful the fix isn't worse than the warning.
November 23, 2025 at 12:40 PM
Total or the package itself? Total is >15mb. Most of it goes to shikijs and similar.

The original streamdown has the same problem.

github.com/vercel/strea...
November 23, 2025 at 12:32 PM
Sorry Paolo, I didn't really explain. :)

The a11y_no_static_element_interactions error. My main div has an onclick. Ai saw svelte-check's warning:
> Warning: `<div>` with a click, dblclick or keydown handler must have an ARIA role

So it "helpfully" added role=button. I didn't think much of it.
November 21, 2025 at 2:18 PM
You are absolutely correct. I just tried on my VPS directly, to avoid any network overhead.

A static asset took ~10ms, while an SSR'ed page took ~25ms.
November 16, 2025 at 8:30 AM
That's cached. Uncached is ~800ms, as shared above.

Caching is without a doubt _the_ key to performance.
November 14, 2025 at 5:15 PM
Thanks Rich. Again, I really enjoyed the talk.

Re ssr, fwiw (maybe not that much!), I asked ai, and it had this to say.

chatgpt.com/s/t_69175cb1...
November 14, 2025 at 4:50 PM
I'm not excluding it :)

I'm questioning whether the 200-500ms on the server will be more if moved to the client.

According to my tests, no. But it needs proper benchmarking.
November 14, 2025 at 11:11 AM
> Obviously a static asset is faster

That's the whole point. An SPA is a static asset. Sending it can be done 200-500ms faster than SSRing.

Yes, the SPA needs to request the data once it the shell has started, but I'd argue the end numbers are the same.
November 14, 2025 at 10:40 AM
I tested this.

> time curl -sD - -o /dev/null svelte.dev/__?_nc=$(date +%s%3N)
0m0.785s (I have to hit a 404 to avoid vercel's cache)

> time curl_h svelte.dev/_app/immutab...
0m0.279s

node added 500ms :)
November 14, 2025 at 10:29 AM
It's far faster for a web server (eg nginx) to serve a static file (SPA) than to proxy the request to Node, have Node render the page server-side, and return the result.

That SSR process easily adds 200ms.

And like I initially said, I've been thinking about this a lot!
November 14, 2025 at 10:25 AM
> AND it has to do a roundtrip to your server to get the data

1. In my case, I always have an external API (ie, not just kit). (I would argue this is often and maybe the majority of cases.) So there isn't much difference whether kit calls it or the client.
2. preload helps, per above
November 14, 2025 at 9:27 AM
> as the browser can't start downloading data before JS is downloaded
You can send it in a preload header, so it's parallel.

> before JS is downloaded and parsed
The server has to do parsing as well. V8 will be cooking either way. :)
November 14, 2025 at 9:27 AM
Great talk; thanks!

> SSR is about performance

I thought about this a lot (I've been writing a custom router and SSR layer for Svelte).

I've concluded that js + data (SPA) can be sent independently as fast (or even faster) as they can be sent rendered together (SSR).

Thoughts?
November 14, 2025 at 8:53 AM
😄
November 6, 2025 at 4:57 PM
pnpx shadcn-svelte@latest update -a -y
November 6, 2025 at 4:08 PM
Weird post to steal
November 4, 2025 at 3:38 PM