StandardAccessibilityAction
The accessibility action names screen readers know: activate, increment, decrement, longpress, magicTap and escape.
Usage
Offer actions to a screen reader.
// Offer actions to a screen reader.
import { HStack, Text, signal, type StandardAccessibilityAction } from 'kuito';
const quantity = signal(1);
// Screen readers offer these on an adjustable view: swipe up or down.
const adjust: { name: StandardAccessibilityAction }[] = [
{ name: 'increment' },
{ name: 'decrement' },
];
<HStack
role="slider"
label="Quantity"
aria-valuenow={quantity.value}
actions={adjust}
onAction={(event) =>
(quantity.value = Math.max(0, quantity.value + (event.actionName === 'increment' ? 1 : -1)))
}
>
<Text>{quantity.value}</Text>
</HStack>;Type declaration
export type StandardAccessibilityAction =
| 'activate'
| 'increment'
| 'decrement'
| 'longpress'
| 'magicTap'
| 'escape';Type
"longpress" | "activate" | "increment" | "decrement" | "magicTap" | "escape"Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.