Post

One minor feature of Preact 11 that we haven't talked about much is the strictly typed aria roles on HTML elements, where possible. In short, `<header role="form">` will now be a type error. Spent quite a bit of time going through the spec docs to build that out, doing our part to make the web more

This did already catch a few mistakes in an app at $DAY_JOB, hope it catches mistakes in other apps too! Bad aria is worse than no aria and browsers have basically no guardrails for this unfortunately. Types in JS frameworks (along with linting tools and the like) can step up to help out.

0 reposts7 likes

No replies yet.