Skip to content

Update: Alert screen reader users when content has been added (fixes #232)#233

Open
swashbuck wants to merge 17 commits into
masterfrom
issue/232
Open

Update: Alert screen reader users when content has been added (fixes #232)#233
swashbuck wants to merge 17 commits into
masterfrom
issue/232

Conversation

@swashbuck

@swashbuck swashbuck commented Oct 17, 2024

Copy link
Copy Markdown
Contributor

Fixes #232

Update

  • Alerts screen reader users when more content has been added to the page once Trickle has unlocked.
  • Adds a new string for the message at _globals._extensions._trickle.additionalContentLoaded in course.json.
  • The announcement now fires concurrent with the content load (rather than after) so it plays during the load wait instead of racing with the post-load focus shift to the next component.

Fix

  • Minor JS linting fixes. TrickleButtonModel.js only has linting fixes.
  • Fix PR template typo.

Dependencies

Depends on the focus-restoration fix in core: adapt-contrib-core#870 (fixes #869). Without it, screen reader focus may briefly land in the navbar after the announcement closes when the clicked Trickle button is hidden via _styleAfterClick: "hidden" (the default). The announcement itself plays correctly either way; only the focus landing point is affected.

Testing

Set _globals._extensions._trickle.additionalContentLoaded to a short message like "Loading." in course.json. Configure Trickle on several blocks covering the variations below.

For each variation, use a screen reader (VoiceOver on macOS recommended; NVDA / JAWS on Windows for cross-SR coverage). Activate Trickle to unlock the next block.

Expected on each variation:

  1. The "Loading." announcement plays while the next block is loading (not after).
  2. Once the next block is ready, focus lands on the next block (not the navbar, not body indefinitely).

Variations

# Trickle setup Why this case matters
1 Button visible + step-locking + completion required (most common) Baseline happy path with a visible Continue button.
2 Button visible + no completion required Button stays interactive throughout; confirms announce plays each click.
3 Auto-continue (no button) + autoScroll + completion required No button to focus; confirms announce works without a clicked element.
4 Trickle on a question block with feedback popup Confirms wait.queue() on popup:closing defers Trickle so the announce fires after the feedback popup closes, not during.
5 Trickle on a block whose next block has a heavy image Confirms the announce plays during the load wait and that focus eventually lands on the next block once images finish loading.

Negative checks

  • Disable _globals._extensions._trickle.additionalContentLoaded (or set it to an empty string). Confirm no announcement plays and Trickle still functions normally.
  • Activate Trickle without a screen reader open. Confirm there is no visual notification leak and no console errors.

@swashbuck swashbuck self-assigned this Oct 17, 2024
@swashbuck swashbuck changed the title Issue/232 Update: Alert screen reader users when content has been added (fixes #232) Oct 17, 2024
Comment thread js/TrickleButtonView.js Outdated
Comment thread js/TrickleButtonView.js Outdated
Comment thread js/TrickleButtonView.js Outdated
@swashbuck swashbuck moved this from Assigned to Backlog in adapt_framework: The TODO Board Mar 4, 2025
Comment thread js/TrickleButtonView.js
swashbuck and others added 2 commits June 25, 2025 13:02
Co-authored-by: Oliver Foster <oliver.foster@kineo.com>
@swashbuck swashbuck moved this from Backlog to Assigned in adapt_framework: The TODO Board Nov 11, 2025
@swashbuck

swashbuck commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

Ready for re-review. Note dependency on Core 870. Also would like to work on #259 once this PR is approved.

@swashbuck swashbuck requested a review from oliverfoster May 22, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Reviewing

Development

Successfully merging this pull request may close these issues.

notifyPushView.closePush restores focus when push never had focus a11y: Loading additional content on a page

2 participants