How plugin could make screen reader read a message?
How could I make a screen reader to read a message?
Use case: Plugin is asynchronously loading some records and presents them in a panel.
In implementing a11y (accessibility) we are to provide a summary as a dynamic update through a screen reader for a blind user.
Plugin is developed in Kotlin using IntelliJ SDK.
We know we could control a screen reader somewhat in Swing by updating a currently focused component or by updating some component and re-focusing on it. Both options have serious drawbacks. For example, we would not know when a reader is done reading a message to restore component content and re-focus back.
How could plugin communicate with screen reader without touching a focus sub-system?
- send a message to a screen reader
- get a callback or set up a listener to learn when a message reading is complete (or cancelled/interrupted)?
Please sign in to leave a comment.
Hi,
Please take a look at https://github.com/JetBrains/intellij-community/blob/master/platform/util/ui/src/com/intellij/util/ui/accessibility/AccessibleAnnouncerUtil.java
Note that this class is new and is not available in older platform versions.