-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Feature request
Overview
The idea is super simple.
By default Toast component collects everything to be pronounced in ToastAnnounce
, which uses Portal
, which is by default appended to body. Here is the particular line of code
But there are cases when it is useful to append that announcer to some custom container. For instance - when the Toast is called from Modal Dialog that uses FocusTrap.js - FocusTrap automagically makes everything except itself inert, and Toast is not announced - having some defined container for toast announcer will allow to add it to the excluded components for FocusTrap and it won't be inert
This may also happen when toast is called from Radix modal, have not checked though. To be fair for me even in official docs Toast is not pronounced in VoiceOver.
Who does this impact? Who is this for?
This is for advanced cases. looks like requires adding something like announcerContainer
to the radix root.