DEV Community

Discussion on: 5 star rating system - ACTUALLY accessible, no JS, no WAI-ARIA and Semantic HTML! ⭐⭐⭐⭐⭐ [Easily converted to any framework too!]

Collapse
 
vikkrantxx7 profile image
Vikrant Sharma

Nice article.. for the last point though you could have used event delegation 🤔.

Collapse
 
grahamthedev profile image
GrahamTheDev

There are a hundred ways to tap into it, essentially I was just showing that all it is is a radio group and so you can attach it in any way to your application simply by accessing the :checked value on the group.

Same principle applies for displaying them, you can just set the checked value with JS.

I perhaps should have come up with a better JS example, it was just something I threw in after I wrote the article as I know some people get put off when they see a CSS and HTML only component thinking they can't use it with a framework / access the value with JS on the front end.