You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/plugins/text-to-speech-announcer.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ In some cases you may not want to clear the entire queue, but instead cancel out
79
79
80
80
Imagine an App with a row of tiles, it's possible that before the title of the role is being spoken out, the user already navigates through the tiles within the row. Traditionally you'd use the focus event to speak out info about each tile (i.e. adding tot the queue). You don't want all previously focused tiles to still be announced, but would still want the category of the row to be announced, making clearing the queue not required.
81
81
82
-
The `speak()`-method return a Promise that also contains a `cancel()` function. When called, it will cancel that specific message and remove it from the queue before it can be spoken out.
82
+
The `speak()`-method return a Promise that also contains a `remove()` function. When called, it will remove it from the queue before it can be spoken out.
83
83
84
84
Additionally if you want to _interrupt_ a specific messages as it's being spoken out as well and go straight to the next message in the queue (i.e. the newly focused item, for example). You can use the `stop()` message that is returned on the Promise returned by the `speak()`-method.
85
85
@@ -100,8 +100,8 @@ Blits.Component('MyTile', {
100
100
unfocus() {
101
101
// when unfocused interrupt the message if it's already being spoken out
102
102
this.message.stop()
103
-
// and cancel the message to remove it from the queue
104
-
this.message.cancel()
103
+
// and remove the message from the queue
104
+
this.message.remove()
105
105
}
106
106
}
107
107
})
@@ -117,4 +117,4 @@ Alternatively the announcer can be enabled or disabled run time by using one of
117
117
118
118
-`this.$announcer.enable()` - activates the announcer
119
119
-`this.$announcer.disable()` - deactivates the announcer
120
-
-`this.$announcer.disable(true/false)` - turns the announcer or on off
120
+
-`this.$announcer.disable(true/false)` - turns the announcer on or off
Whenever you navigate to a new page, the URL hash will automatically be updated. Unless specified otherwise, navigating to a new page, will add that route to the history stack. The `back` input action is automatically wired up to navigate back down the history stack.
98
98
99
+
By default, every time you navigate to a new route, the application focus will be automatically passed to the newly loaded page. If you instead want to maintain the current focus (for example in a widget that sits above your RouterView), you can use `passFocus: false` as part of the router options.
100
+
99
101
## Deeplinking
100
102
101
103
The Router plugin has support for deeplinking. When the App is loaded with a URL hash (i.e. `#/pages/settings/network`), the router will try to match that hash to a defined route. This means that your app can be deep linked into, by simply providing the correct URL hash.
0 commit comments