0

Narrator is not reading the TextBlock inside a UserControl:

<UserControl.Template>
    <ControlTemplate>
        
      <TextBlock Text="Test text" Focusable="True" AutomationProperties.AutomationId="Test_text" />

    </ControlTemplate>
</UserControl.Template>

If I am changing the TextBlock to Button, the Narrator is capable of reading it. What options do I have to make this readable by Narrator other than making buttons that look like labels?

3
  • I am guessing: Narrator is not reading everything, but something you need to interract with. This answer suggests to make control focusable, try it. Commented Sep 26, 2024 at 14:56
  • @Sinatr the control is focusable. You can see the code sample above, it is the TextBlock. Commented Sep 26, 2024 at 18:54
  • What does Narrator reads exactly? The text of element what has keyboard focus? Then you need to set focus explicitly by calling Focus() or using Tab key (you have Focusable=true already for Tab-key to work). Maybe an easier solution is to use Label instead of TextBlock, they are quite similar controls. This answer points out that Label supports access key (same as Button), so maybe this is, what Narrator checks and what TextBlock doesn't provide, therefore being ignored? Commented Sep 27, 2024 at 8:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.