AutomationProperties not reqognized by Narrator

4 posts, 1 answers
  1. Rob
    Rob avatar
    16 posts
    Member since:
    May 2014

    Posted 15 Sep 2015 Link to this post

    I've been using some usefull telerik controls for a while, at this point I'm adding some more options voor accessibility to my applications. Narrator or other screen readers are able to read AutomationProperties like Name and HelpText. But when setting these properties on the RadRichTextBox they are not reqognized by windows and the applications reading the AutomationProperties (tool to check: Inspect)

    The AutomationMode of the Telerik AutomationManager is already set to FrameworkOnly. When something else is selected all my automationproperties on controls are ignored.

    Here is the used xaml:

    01.<telerik:RadRichTextBox HorizontalAlignment="Stretch"
    02.                        VerticalAlignment="Stretch"
    03.                        x:Name="radRichTextBox"
    04.                        BorderThickness="0"
    05.                        Margin="0,2,0,0"
    06.                        DocumentInheritsDefaultStyleSettings="True"
    07.                        Focusable="True"
    08.                        FontSize="13"
    09.                        FontFamily="Segoe UI"
    10.                        AutomationProperties.Name="Message for chat">
    11.    <i:Interaction.Behaviors>
    12.        <behaviors:TelerikRichTextBoxOptionsBehavior />
    13.        <behaviors:ChatRadTextBoxBehavior />
    14.    </i:Interaction.Behaviors>
    15.    <telerik:RadRichTextBox.InputBindings>
    16.        <KeyBinding Modifiers="Control"
    17.                    Key="Tab"
    18.                    Command="{Binding Path=DataContext.NextTabCommand, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}" />
    19.        <KeyBinding Modifiers="Control+Shift"
    20.                    Key="Tab"
    21.                    Command="{Binding Path=DataContext.PreviousTabCommand, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}" />
    22.    </telerik:RadRichTextBox.InputBindings>
    23.</telerik:RadRichTextBox>
    24.<telerik:TxtDataProvider x:Name="TextDataProvider"
    25.                         Text="{Binding PlainContent, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
    26.                         RichTextBox="{Binding ElementName=radRichTextBox}"  />

    Any suggestions how I can fix this or about what I'm doing wrong?

  2. Boby
    Admin
    Boby avatar
    595 posts

    Posted 16 Sep 2015 Link to this post

    Hi Rob,

    Setting AutomationManager.AutomationMode to FrameworkOnly will basically disable the automation peers of the Telerik controls. For example OnCreateAutomationPeer method of RadRichTextBox will just call the base implementation, which happens to return null - I guess that's why the Window consider to not having RadRichTextBox as automation child.

    If you change the Automation mode to Basic, the control and it's name will be detected as expected (please find a screenshot attached). You can read more about the different automation modes in the UI Automation Support help article.

    Regards,
    Boby
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rob
    Rob avatar
    16 posts
    Member since:
    May 2014

    Posted 16 Sep 2015 Link to this post

    When I use Automation mode basic, the narrator and also inspect will not see that the RadRichTextBox is focussed (Inspect set to "Watch Focus"). only mouse over mode wil be able to find the control in inspect.

    So the narrator will never read the Name because focus is not reqognised, same behavior occurs when using NVDA. Is there a way to enable the focus in the right way or what is different for the RadGridTextBoxt? Or is there a way to set the AutomationProperties of the textbox beneeth the RadRichTextBox when AutomationMode is set to FrameworkOnly.

    Another solution is also welcome. But I like this to work.

  5. Answer
    Boby
    Admin
    Boby avatar
    595 posts

    Posted 18 Sep 2015 Link to this post

    Hi Rob,

    I can see your problem now. It is related to the internal structure of RadRichTextBox - it internally contains TextBox (named Caret) and re-uses some of its functionality. When RadRichTextBox gets the focus, it automatically transfers the focus to the Caret. I logged the issue in our feedback portal here:
    AutomationProperties.Name is not pronounces by screen readers when set to RadRichTextBox

    You can workaround the problem in this case by setting the automation name to the caret itself. Attached is a project demonstrating the approach.


    Regards,
    Boby
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top