New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A variety of accessibility-related fixes for the contents of the main pane on the Config page #8682
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8682 +/- ##
==========================================
+ Coverage 55.99% 56.11% +0.11%
==========================================
Files 905 919 +14
Lines 65301 65518 +217
Branches 11882 11997 +115
==========================================
+ Hits 36568 36764 +196
+ Misses 25794 25760 -34
- Partials 2939 2994 +55
Flags with carried forward coverage won't be shown. Click here to find out more. |
can you please sign off in contributors.txt? This is just one form - is it possible to make an estimate of what it would take to apply to all? |
Also try adding a control and seeing if it breaks things. This is why we
have tabindex. So it needs to be tested well. Try removing a control and
then adding it again.
…On Wed, Dec 16, 2020, 1:48 PM Gerhard Olsson ***@***.***> wrote:
can you please sign off in contributors.txt?
This is just one form - is it possible to make an estimate of what it
would take to apply to all?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8682 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA3WDMJ7ZRGBKOAGO4QBQLDSVD6G7ANCNFSM4U6KLFRQ>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, have not run it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is interesting, so we don't need tabindex to be accessible? Seems counter-intuitive...
I can see it breaking when someone adds a control or removes a control and
then adds a control.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tab order the same as before
// | ||
// btnCommitTemplateBrowse | ||
// | ||
this.btnCommitTemplateBrowse.AccessibleName = "Browse Path to commit template"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These strings should probably be translated.
The translation app is not picking this up right now (this is the first use of AccessibleName in this project).
Short term, translation strings could be created separately (but how hard can it be to fix the translationapp, to make sure the build fails if not translated?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point, thanks for raising it. The AccessibleName properties needs to be as translated as visual text labels are. (So by default, translated, except for things like branding.) The AccessibleName is what gets announced by screen reader for customers who are blind or have low vision, so needs to be in a language that the customer wants. I hard-coded the strings because in the same file there seemed to be hard-coded Text properties, and I assumed the app wasn't localized. It sounds like I made the wrong assumption. If the AccessibleName properties won't be translated, the change should be canceled until it's possible to have the strings translated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the removal of the use of TabIndex, WinForms apps are vulnerable to both the tab order and the programmatic order of the UI not being a good match for the use of the UI. The tab order is relatively straightforward to fix in VS through use of its "Tab Order" feature (in the View menu) but that doesn't fix the programmatic order. The only way to fix the programmatic order is to ensure that the calls to Add() in the designer.cs file match the logical order of the UI. The existing TabIndex use overrides that, so if the TabIndex use is removed the Add() order will dictate the tab order and programmatic order. If the form is later opened up in the VS designer, the TabIndex use will be added back but in an order that matches the Add() order, so the tab order and programmatic order remain good. A point was raised above that things may break later when controls are added or removed, and that's right. All WinForms apps are vulnerable, and the only way for things to work well for customers is for app builders to include the maintenance of the tab order and programmatic order in the list of things they do as their app evolves over time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AccessibleName will be translated when you rebase, the TranslationApp will pick up this field and add it to the source English.xlf, translated on Transifex.
https://github.com/gitextensions/gitextensions/wiki/How-To%3A-build-instructions#update-english-translations
So for order: The easiest way around seem to be to just make sure that there is no TabIndex
Can you please rebase on master, you will have to run translation too: cla too: https://github.com/gitextensions/gitextensions/blob/master/contributors.txt |
Could you give your signoff to the contributors list in a dedicated PR, please, in order to avoid merge conflicts by merging it quickly? |
Thank you |
1. Update app.config to pick up some .NET Framework accessibility fixes up to 4.8, depending on what version of .NET Framework is available on the device at runtime. 2. Add unique accessible names for the Browse and Suggest buttons to avoid duplicate names being exposed programmatically on sibling buttons. (If the UI is ever localized, the accessible names must be localized too.) 3. Change the order in which controls are added to their containers, in order to have the programmatic order (as exposed through the UI Automation API) of the controls match their logical order. 4. Remove the TabIndex property being set on the controls, because that interferes with WinForms setting accessible names on TextBox and ComboBox controls based on the text from the Labels that programmatically precedes them. The default tab order is now based on the order in which the controls are added to their containers.
921f0cd
to
bbddb2d
Compare
I've run the built artifacts and verified that the changes are good. The image below shows the Accessibility Insights for Windows tool reporting that all the controls in the main area of this particular config UI have appropriate UIA Name properties, and they appear in the logical order in the UIA hierarchy. I manually verified that when tabbing through the controls, keyboard focus moves in the expected order. |
Thank you! |
Update app.config to pick up some .NET Framework accessibility fixes up to 4.8, depending on what version of .NET Framework is available on the device at runtime.
Add unique accessible names for the Browse and Suggest buttons to avoid duplicate names being exposed programmatically on sibling buttons. (If the UI is ever localized, the accessible names must be localized too.)
Change the order in which controls are added to their containers, in order to have the programmatic order (as exposed through the UI Automation API) of the controls match their logical order.
Remove the TabIndex property being set on the controls, because that interferes with WinForms setting accessible names on TextBox and ComboBox controls based on the text from the Labels that programmatically precedes them. The default tab order is now based on the order in which the controls are added to their containers.
Before
The Accessibility Insights for Windows tool reports 31 failures against the UI, as shown in the following image
After
The Accessibility Insights for Windows tool reports 7 failures against the UI, as shown in the following image. Note that today the remaining failures cannot be avoided while building for .NET Framework.