dasher-web
dasher-web copied to clipboard
Proper error message if speech is unavailable or no voices are available
There are two conditions in scope of this issue.
- Speech synthesis is unavailable in the browser or web view that is rendering Dasher.
- Speech synthesis is available but no voices are available.
In current Dasher Version Six these cases are handled by setting an error message in the language selection control. Instead, that control should be hidden or greyed and an informative message displayed in the UI. Could be done by adding convenience methods to Control in controlpanel.js to hide and grey the control. Hiding could be done by removing the control from its parent.
Jim says: Don't do this by showing an alert.
- Detection of the conditions is near here: https://github.com/dasher-project/dasher-web/blob/debdb6022d42f378b0931071ccdd376455ce7df1/browser/dasher/userinterface.js#L277
- The Control class is near here: https://github.com/dasher-project/dasher-web/blob/debdb6022d42f378b0931071ccdd376455ce7df1/browser/dasher/controlpanel.js#L10