| 1 | /** |
| 2 | * A translated label that ends in a direction arrow ("Install →"). The arrow |
| 3 | * is decoration, so screen readers hear only the words. |
| 4 | */ |
| 5 | export function ArrowLabel({ text }: { text: string }) { |
| 6 | const match = text.match(/^(.*?)\s*([→←])\s*$/u); |
| 7 | if (!match) return <>{text}</>; |
| 8 | return ( |
| 9 | <> |
| 10 | {match[1]} |
| 11 | <span aria-hidden="true" style={{ marginInlineStart: "0.35em" }}>{match[2]}</span> |
| 12 | </> |
| 13 | ); |
| 14 | } |
| 15 |