-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix UIA navigation for TabControl #5380
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
Fix UIA navigation for TabControl #5380
Conversation
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
148cd65 to
37c9842
Compare
|
@Tanya-Solyanik , can you take a final look at this? |
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
RussKie
left a comment
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.
👍 with few comments
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
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.
redundant
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
37c9842 to
57e4152
Compare
57e4152 to
e4960e3
Compare
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
Tanya-Solyanik
left a comment
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.
@dreddy-work - what is the appropriate label for new public surface.
Looks good, please see my comments though.
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabPage.TabPageAccessibleObject.cs
Outdated
Show resolved
Hide resolved
...ystem.Windows.Forms/tests/UnitTests/System/Windows/Forms/TabPage.TabAccessibleObjectTests.cs
Outdated
Show resolved
Hide resolved
...m.Windows.Forms/tests/UnitTests/System/Windows/Forms/TabPage.TabPageAccessibleObjectTests.cs
Outdated
Show resolved
Hide resolved
We're adding overrides here, which is acceptable; and thus we don't treat these as "new API", which require an API Review Board approval, documentations, etc. |
|
@RussKie - Overrides require new documentation topics, are they generated automatically? |
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.
Please add a test to see if clients are listening.
I believe the override docs are generated automatically. @gewarren @carlossanlop is this correct? |
Yes the override methods will appear on the main page for the type, like this: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics.observablecounter-1?view=net-6.0#methods |
dreddy-work
left a comment
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.
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
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.
What happens when we hit the spinner control? Suppose we have more tab headers than fits into the control width, then we show a left/right arrows to navigate between the tab headers. Do we hit-test those arrows correctly?
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.
I have investigated this question and did not find direct access to the Spinner from the TabControl. We are now using the native Spinner implementation. I have not seen any difference in behavior since .NET Framework 4.7.2, except that now the Spinner is displayed first in the list of control elements, and not second as in .NET Framework 4.7.2. How critical do you think this is?
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.
Let's keep the hierarchy as is and follow up with Ryan. We can address this separately.
src/System.Windows.Forms/src/System/Windows/Forms/TabControl.TabControlAccessibleObject.cs
Outdated
Show resolved
Hide resolved
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.
The difference between UIA clients listening and AO create APIs is that the former will force creation of AO if AT (or touch driver) is listening but the object had not been created yet. This might be desired if tab is the first object accessed by narrator. Note that touch driver needs AO created to work as well as AT does.
…lity Insights For Windows) keyboard combination Shift+Ctrl+F5/F6/F7/F8/F9 doesn't work with the TabControl dotnet#3058 Updated "SupportsUiaProviders" flag. Added and implemented accessible objects for the TabControl and TabPage Added unit tests. Fixed issue with Narrator
8288bbd to
52288b6
Compare
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.
Looks good to me, please get a review from Vladimir and follow up with Ryan if we have to create a custom provider for the spinner control.
|
@vladimir-krestov , I merged this. If you have further feedback, please feel free to update this and @SergeySmirnov-Akvelon will update them in the next PR along with the pending investigation. |


Fixes #3058
Related issue: #3421
Proposed changes
Customer Impact
Before fix:
Shortcuts in some cases did not work for TabControl
After fix:

Regression?
Risk
Test methodology
Accessibility testing
Test environment(s)
Microsoft Reviewers: Open in CodeFlow