They are shown when you run the tests. Until then they appear as a hidden requirement.
Build a rating component with five stars. You practice choosing the minimal state: one number from which everything else is deduced.
aria-labels (1 star, 2 stars...) and the role="status": the tests use them.Not rated.N of 5 with that star's number.Not rated.★ and has aria-pressed="true"; an unmarked one shows ☆ and aria-pressed="false".Not rated.4 stars → you see 4 of 5.2 stars → you see 2 of 5.2 stars again → you see Not rated.The rating is a single number between 0 and 5: store it in useState.
A star is marked if its number is less than or equal to the rating; you do not need to store which stars are marked.
The text also comes from the rating.
aria-pressed for controls that toggle on and off.The console is empty
Run your code with Ctrl+S
This console starts empty every time the preview loads. The browser's DevTools console keeps the messages with Preserve log.