Conversation
…urn childrenAdded from controller continue()
Comment on lines
+218
to
+229
| async announceContentLoaded() { | ||
| const globals = Adapt.course.get('_globals'); | ||
| const message = globals?._extensions?._trickle?.additionalContentLoaded; | ||
| if (!message) return; | ||
| notify.create({ _type: 'a11y-push', body: message }); | ||
|
|
||
| // Allow time enough for the message to be read before focusing. | ||
| // Rough estimate: 200ms per word + buffer | ||
| const words = message.split(' ').length; | ||
| const delay = (words * 200) + 300; | ||
| return new Promise(resolve => setTimeout(resolve, delay)); | ||
| } |
Member
There was a problem hiding this comment.
Suggested change
| async announceContentLoaded() { | |
| const globals = Adapt.course.get('_globals'); | |
| const message = globals?._extensions?._trickle?.additionalContentLoaded; | |
| if (!message) return; | |
| notify.create({ _type: 'a11y-push', body: message }); | |
| // Allow time enough for the message to be read before focusing. | |
| // Rough estimate: 200ms per word + buffer | |
| const words = message.split(' ').length; | |
| const delay = (words * 200) + 300; | |
| return new Promise(resolve => setTimeout(resolve, delay)); | |
| } | |
| async announceContentLoaded() { | |
| const globals = Adapt.course.get('_globals'); | |
| const message = globals?._extensions?._trickle?.additionalContentLoaded; | |
| if (!message) return; | |
| await notify.read(message); | |
| } |
Can you try the above with the following pr, please?
Contributor
Author
There was a problem hiding this comment.
Tested on a few question components. This seems to work if the user is required to click the Trickle button to continue. However, if not showing the Trickle button, it's hit or miss. Usually, the focus immediately goes to the Show Correct Answer button (or disabled Submit) and that is read out. So, we never hear "Loading." I'm using auto scroll in both cases.
Member
There was a problem hiding this comment.
Could you try it with all three of these prs please?
adaptlearning/adapt-contrib-core#673
adaptlearning/adapt-contrib-core#677
adaptlearning/adapt-contrib-core#679
Co-authored-by: Oliver Foster <oliver.foster@kineo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚧 Work in progress 🚧
Fixes #232
Update
_globals._extensions._trickle.additionalContentLoadedin course.jsonFix
Testing