adobe / react-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.
https://react-spectrum.adobe.com
Apache License 2.0
12.64k stars 1.09k forks source link

Rating component #5911

Open mengyinl-adobe opened 7 months ago

mengyinl-adobe commented 7 months ago

Provide a general summary of the feature here

https://spectrum.adobe.com/page/rating/

๐Ÿค” Expected Behavior?

Displaying a star rating widget and allow users to click on the stars to give a rating

๐Ÿ˜ฏ Current Behavior

Currently it is not available in React Spectrum

๐Ÿ’ Possible Solution

No response

๐Ÿ”ฆ Context

To display a rating with a star widget and allow users to submit a rating

๐Ÿ’ป Examples

No response

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

reidbarber commented 7 months ago

Note that this can use a radio group for the semantics: https://www.w3.org/WAI/ARIA/apg/patterns/radio/examples/radio-rating/

The labeling may need some tweaking so that the total number of stars is announced.

Edit: Maybe also consider the slider pattern for better touch support