Improve types
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -110,7 +110,7 @@ Pass `onPress` and a `label` (used as the accessible name for screen readers) to
|
||||
|
||||
### Link
|
||||
|
||||
Pass `href` to make the card surface navigate to a URL. The `label` prop is optional but recommended for accessibility when the card content alone may not sufficiently describe the destination.
|
||||
Pass `href` to make the card surface navigate to a URL. `label` is required — it provides the accessible name for the invisible overlay link read by screen readers.
|
||||
|
||||
<Snippet
|
||||
align="center"
|
||||
|
||||
@@ -32,7 +32,7 @@ export const cardPropDefs: Record<string, PropDef> = {
|
||||
type: 'string',
|
||||
responsive: false,
|
||||
description:
|
||||
'Accessible label announced by screen readers for the interactive overlay. Required when onPress is provided.',
|
||||
'Accessible label announced by screen readers for the interactive overlay. Required when onPress or href is provided.',
|
||||
},
|
||||
...classNamePropDefs,
|
||||
...stylePropDefs,
|
||||
|
||||
Reference in New Issue
Block a user