Wrap it in role="radiogroup" and make each star role="radio" (or use five visually-hidden radio inputs) so it behaves exactly like a radio group where exactly one score is chosen. The star shape carries no meaning to a screen reader on its own, so the value needs to be read as text — "3 out of 5 stars."
The difference from a slider is continuous vs. discrete — a slider handles any value along a range, while a rating is a small, exact scale (1, 2, 3…) that can be counted at a glance by icon.
Distinguish the hover "preview" fill from the click "commit" — a score shouldn't be saved to the server just because the pointer passed over it.