To support users with screen readers, an aria-label is used to provide a description of the rating. The aria-label can be customised by providing the aria-label prop.reviewText is rendered as provided, including when it is a link. Supply the translated phrase, such as “1 review” or “12 reviews”.
The Rating can be de-emphasized by setting the tone to neutral.This makes the icon(s) follow the default text colour, including inverting on dark surfaces to improve contrast.
Provide the full review count phrase via the reviewText prop, including pluralisation and a count of zero. If a reviewLink is provided, that phrase is displayed as a link.To handle clicks on the review count, you can provide a onClick handler. When attaching a click handler, reviewLinkmust be passed so the href stays available for assistive technologies while a handler can call preventDefault().
Braid components are very explicit about the properties they accept, which makes providing arbitrary data attributes not possible. Instead, a data prop can be provided as a single collection of data attributes.