Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They're definitely not trivial. Do you build them well? I don't mean this as an insult to your work; I just know that these components have a million little details and edge cases that makes them not trivial if you care about getting them right.

Let's take a modal, for example. The easy part is clicking a button and having something show up on top of everything else. But do you…

- make sure screen readers announce it correctly when it's opened?

- make sure it has the correct ARIA attributes?

- trap focus within the modal so that you can't tab to an element in the page behind it?

- allow it to be closed with escape?

- return focus to the correct element when it closes?

These aren't arbitrary requirements I'm making up. The W3C has detailed documentation [1] about how people should be able to interact with these components. It's not something I want to spend my time doing, and frankly when it comes to things like ARIA attributes and screen readers it's not something I'm confident I'll do well. That's why libraries like Radix and React Aria are so valuable. You get rich, accessible components basically for free.

[1] https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: