开发者

WiX UI elements in wrong order for Screen Readers

When I create a custom dialog in WiX, I put elements down in the order "Text" "Edit" "Text" "Edit" et. For example:

<Control Id="NameText" Type="Text" X="25" Y="50" Width="100" Height="10" Text="Enter Name:"/>
<Control Id="NameEdit" Type="Edit" X="25" Y="60" Width="100" Height="15" Text="jo_bob55"/>
<Control Id="AgeText" Type="Text" X="25" Y="80" Width="100" Height="10" Text="Enter Age:"/>
<Control Id="AgeEdit" Type="Edit" X="25" Y="90" Width="100" Height="15" Text="0"/>
<Control Id="ColorText" Type="Text" X="25" Y="110" Width="100" Height="10" Text="Enter your favorite color:"/>
<Control Id="ColorEdit" Type="Edit" X="25" Y="120" Width="100" Height="15" Text="red"/>

However, when I run the installer, and listen to it in Windows Narrator (or look at it with UI Spy), the elements will be in the order

  • NameEdit
  • AgeEdit
  • ColorEdit
  • NameText
  • AgeText
  • ColorText

The secondry problem is that if there is a banner image (let's call it BitmapBanner, text field WiXUI_Bmp_Banner), then all my edit boxes will be listed as "LabledBy" in UI 开发者_StackOverflowSpy, and Narrator will read "WixUI Bmp Banner Edit, WixUI Bmp Banner Edit" multiple times.

Looking at other MSIs in UI Spy, I don't appear to be the only one having this issue (try the Steam installer language selection screen in UI Spy - guess the flag names).

I guess my question is: can I fix this, or is this a fault in WiX 3.0?


I'm guessing that the order used by accessibility software like Windows Narrator is the same as the tab order of the controls. Windows installer reads this order from the Control_Next column in the Control table in your installer.

Judging from the Control element documentation, it looks like Wix does not have an XML attribute to explicitly set the value for this Control_Next field (though you can use the TabSkip attribute to force it to be empty).

I would open up the MSI file with Orca and take a look at the Control_Next column of the Control table. If you can confirm that these values aren't in the expected order, then at least you know the problem is in wix.

You might also want to take a look at the Accessibility documentation for Windows Installer.


I reported the same type of issue to the wix team here: http://sourceforge.net/tracker/index.php?func=detail&aid=2902901&group_id=105970&atid=642717

The wix team told me it is an msi issue and I have verified this.

I went ahead and submitted a bug report to Microsoft here: https://connect.microsoft.com/VisualStudio/feedback/details/652381/windows-installer-msi-engine-incorrectly-sets-the-ui-automation-name-property-of-edit-controls-in-dialogs

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜