How can I get the screen reader to announce when Loading happens when the loading is coming from a third party library?

I have an application that offers the Loading circle, but the screen reader is unable to announce it. The problem is this feature is coming from a couple of third-party css and js libraries.

Loading is happening from a third party library.

The idea now is to overwrite the programmatic third-party library loading and just hard code the Spinner.

Has this ever been solved before?