Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

Rating

Rating is a component that allows users to evaluate items, presented in the form of icons such as stars or hearts, and visually displays the rating selected by the user.

Rating follows the WAI-ARIA - Radio Group Pattern for accessibility.

Setting aria-label or aria-labelledby on Rating will make it readable by screen readers.

<Rating aria-label="Rating" />
Copied!
<VStack gap="sm">
<Heading as="h3" id="label">
Rating
</Heading>
<Rating aria-labelledby="label" />
</VStack>
Copied!

Keyboard Navigation

KeyDescriptionState
TabFocus on the selected item. If no item is selected, focus on the first item.-
ArrowLeft, ArrowUpFocus on and select the previous item. If the first item is selected, select the last item. Deselect the previously selected item.-
ArrowRight, ArrowDownFocus on and select the next item. If the last item is selected, focus on and select the first item. The previously selected item will be deselected.  -

ARIA Roles and Attributes

ComponentRoles and AttributesUsage
Ratingrole="radiogroup"Indicates that this is a radio group.
aria-labelIndicates the number of selected items.
aria-readonlySet to "true" when isReadOnly is specified.
aria-disabledSet to "true" when isDisabled is specified.
RatingItemaria-labelSet value.
RatingIcon Internalaria-hidden="true"Exclude RatingIcon from the accessibility tree.

Edit this page on GitHub

PreviousEditableNextSegmentedControl