I agree, they should not steal the focus and interrupt the workflow.
Lets see what joanie gives us. On gnome they doesnt steal the focus as well. so my hope is that there is already an "easy" way to fix this.
I found an example extension for gnome-shell. It sends the clipboard (when it changes) to orca using ATK to make orca announce the clipboard change.
seems that there is an special role for notifications. maybe they dont need toget the focus?
I dont see any focus change directives. the example code is very small. maybe we can understand it.
We got an answer:
seems we dont have to steal the focus. we just have to emit an atk sateChange event.
would this be doable?
And the patch is in, so starting with Qt 5.12.5 you'll be able to uses it as role. To be honest, I'm not a big fan of the linux/at-spi api here, other platforms send a notification as far as I can tell. Forcing the "notification" role on something seems pretty arbitrary to me. But we decided to play along and make Orca work, so for now that's how it's going to be.