accessibility.announce
The screen reader reads message, interrupting what it is saying; with
queue: true it waits for current speech (iOS; Android always queues).
Usage
Respond to screen reader and motion settings
import { Pressable, Text, accessibility, ref, signal, watch } from 'kuito';
export function Results() {
const title = ref();
const animations = signal(true);
accessibility.announce('12 shows found');
accessibility.announce('Saved', { queue: true });
watch(accessibility.reduceMotion, (calm) => {
animations.value = !calm;
});
return (
<Pressable onPress={() => title.current && accessibility.focus(title.current)}>
<Text ref={title}>{accessibility.screenReader.value ? 'Screen reader on' : 'Results'}</Text>
</Pressable>
);
}Signatures
(message: string, options?: { queue?: boolean; }): voidParameters
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | — |
options | { queue?: boolean;} | No | — Default: {} |
Returns
void
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.