HeaderPane
Main
Hide
Share Link
Print

Accessibility (Screen Readers)

SftMask/NET 3.0 includes built-in Windows UI Automation (UIA) support. Users who rely on Narrator, NVDA, JAWS or any other UIA-compatible assistive technology can read and use the control, including its buttons, the popup calculator and the autocomplete list, without the hosting application doing any work. There is no opt-in and no code change required.

Names

A control is named by its AccessibleName property. Without one, it takes the text of the label in front of it in tab order, the label whose mnemonic moves the focus to it, as Windows does for text boxes. Place a Label with a text such as "&Amount:" directly before the control in tab order, or set AccessibleName. A control without either is named by its own label (SftMask.Label property, see Label). The AccessibleDescription property becomes the control's help text.

Elements

ElementExposed as
FieldAn edit control. Its value is the text with literals, and screen readers read characters, words and the selection as the caret moves (Value and Text patterns). Password fields report themselves as such; their value is empty, and their text holds the characters as shown, with the password character in place of hidden input. When autocomplete shows a list, the field expands and collapses it.
ButtonsThe up and down buttons are buttons named "Up" and "Down", the ellipse button a button named "Browse".
AutoComplete listA list named "Suggestions" whose entries are list items that can be selected. While the list is open, the selected entry has the UI Automation focus, so screen readers announce each entry as the user moves in the list.
CalculatorA pane named "Calculator" holding the lines of the tape as text elements and the entry line as an edit element named "Entry", which screen readers read like the field.

Screen readers can also change the contents, spin numeric fields, click the buttons and select autocomplete entries. These actions work like the equivalent mouse and keyboard actions, so the control's events occur as usual. Changes of the contents, the selection and the popups are reported to screen readers automatically. The providers are created the first time a UI Automation client asks for them, so there is no overhead for applications whose users never run assistive technology.

Announcements

The control announces the calculator with its operator when it opens ("Calculator, add") and the total when it is entered into the field, and the number of suggestions when the autocomplete list opens or the number changes.

The SftMask.Announce method pushes short status messages ("Amount saved", "Customer number not found") to screen readers. An overload also takes the kind of message (AnnounceKindEnum) and whether the message interrupts what the screen reader is saying. Use it for momentary status updates that are not otherwise visible in the control.

Dark mode and Windows High Contrast are independent accessibility settings. See Dark Mode and High Contrast.