locked
Narrator doesn't read out LiveRegion text, because a gridview reannounces the selected element RRS feed

  • Question

  • Hello. I have a TextBlock marked with AutomationProperties.LiveSetting="Assertive". When I hit Enter on a grid view nearby, the TextBlock is updated. I call

     

    TextBlockAutomationPeer.FromElement(ResultsText).RaiseAutomationEvent(AutomationEvents.LiveRegionChanged);

    but nothing happens. It's probably because the GridView insists on reannouncing the selected element, and takes priority over the announcing of the ResultsText. This seems like a bug. Do you have an idea on how to workaround this? The whole point of Assertive messages is that they would get priority :S


    Goblin Dice Roller for your RPG games!

    Monday, September 16, 2013 11:41 AM

Answers

  • Interesting. The Automation Event is not logged in AccEvent BUT the event gets raised on normal occasions. While creating the reproduction project I realized the problem occurred only when I was reacting to the GridView click by opening a flyout, asking some options and then calling the event. When Focus went from the Flyout back to the GridView, the LiveRegion announcement got trumped by the new announcement that focus got back to the GridView.

    The solution was easy: I closed the flyout before calling the code that ended up updating the LiveRegion. In this way, the previously selected item of the GridView was announced, and was immediately followed by the announcement of the LiveRegion.


    Goblin Dice Roller for your RPG games!


    • Edited by noise goblin Tuesday, September 17, 2013 9:56 AM Updated and made the post more precise
    • Marked as answer by noise goblin Tuesday, September 17, 2013 9:56 AM
    Tuesday, September 17, 2013 8:17 AM

All replies

  • Hi Goblin,

    Are you sure the automation event is getting raised? You can get a better view of which events are actually raised by examining them in the Accessible Event Watcher (AccEvent). This will show you the raw data raised rather than relying on the data filtered and interpreted by Narrator.

    If you can provide a minimal sample which demonstrates how you are calling this along with exact repro steps then I'd be happy to take a look at it in more detail.

    --Rob

    Tuesday, September 17, 2013 12:14 AM
    Moderator
  • Interesting. The Automation Event is not logged in AccEvent BUT the event gets raised on normal occasions. While creating the reproduction project I realized the problem occurred only when I was reacting to the GridView click by opening a flyout, asking some options and then calling the event. When Focus went from the Flyout back to the GridView, the LiveRegion announcement got trumped by the new announcement that focus got back to the GridView.

    The solution was easy: I closed the flyout before calling the code that ended up updating the LiveRegion. In this way, the previously selected item of the GridView was announced, and was immediately followed by the announcement of the LiveRegion.


    Goblin Dice Roller for your RPG games!


    • Edited by noise goblin Tuesday, September 17, 2013 9:56 AM Updated and made the post more precise
    • Marked as answer by noise goblin Tuesday, September 17, 2013 9:56 AM
    Tuesday, September 17, 2013 8:17 AM