In the recent past, I’ve heard React being criticised for not being accessible, or for allowing practices that don’t help developers think about accessibility.
I have to disagree.
Just like any other frontend code, working with React in an accessible way requires some forethought.
One of the common mistakes I’ve seen is that we sometimes put click events on non-semantic elements. It’s true, React makes it very easy to put a click event on any dom element.
However, if we’re thinking about accessibility, we’re committing ourselves before we start coding, that we’re going to do things the right way, including using semantic elements. If we do this, we’ll ensure we assign a click event to a semantic element to start with - a