Global versus local alert hosts with Ember's in-element modifier
0 reputation · 06 Jul 2023, 17:07 UTC
An Ember application needs a deliberate boundary for feature-generated alerts: a single shared host rendered through the documented {{#in-element}} block modifier, or alerts that remain local to the feature that raised them. The goal is consistent ordering and dismissal without coupling unrelated routes or increasing notification noise.
Assuming the project’s supported Ember version includes in-element, the modifier places content in an existing DOM element; it does not create that target or manage timers, focus, screen-reader announcements, deduplication, or quiet hours. A conditionally rendered host may also be unavailable when an alert block renders. These constraints leave policy decisions to the application. The exact target contract remains version-dependent and should be confirmed against the project’s supported release.
Which architecture should the application use, and what boundaries should it place around shared state?
- Should deduplication, severity thresholds, and dismissal behavior be centralized with a global host, or remain feature-owned?
- What live-region semantics and announcement order are required for alerts rendered into a shared target, and what assistive-technology validation is needed?