Levi McGranahan
levimcg.bsky.social
Levi McGranahan
@levimcg.bsky.social
Im a designer and front-end web developer working on design systems at Indiana University.
Right, but “escape hatch” implies there is a better “right” way to accomplish something. There’s no declarative way (e.g., an attribute that isn’t `autofocus`) to set focus on an element on the fly. Same for something like setting the .indeterminate property on a checkbox. Maybe that just me tho.
December 20, 2024 at 12:43 AM
Definitely always felt this with the way refs are documented as some sort of anti pattern when they’re absolutely necessary if you want to build actually accessible stuff where you need to manage focus e.g., calling Element.focus()
December 20, 2024 at 12:25 AM