0

How do I set the aria-hidden attribute on a XAML form? More precisely, I need to set the aria-hidden attribute programmatically on the .xaml.cs file.

I need to set the aria-hidden to true because right now I have two interfaces overlapping, each one is hidden/disabled based on a drop-down box.

It all works correctly until it went through JAWS testing and the text-to-speech reader is reading the hidden field and hidden labels. After some research it appears as though I must set the aforementioned aria-hidden attribute to true when the fields are hidden to prevent the text-to-speech reader form reading them.

On the .xaml.cs form I'm hiding the fields on an event

this.myLabelForName.Visibility = Visibility.Hidden;

The this.myLabelForName does not a have a aria-hidden attribute.

I would like to set the aria-hidden to true because it would assist users. The aforementioned link states:

"Authors MAY, with caution, use aria-hidden to hide visibly rendered content from assistive technologies only if the act of hiding this content is intended to improve the experience for users of assistive technologies"

ConfusedDeer
  • 3,335
  • 8
  • 44
  • 72

0 Answers0