Skip to content

Conversation

@SergeySmirnov-Akvelon
Copy link
Contributor

@SergeySmirnov-Akvelon SergeySmirnov-Akvelon commented Jun 4, 2021

Fixes #4983

Proposed changes

  • Updated "SupportsUiaProviders" flag.
  • Added and implemented ScrollBar accessible objects
  • Added unit tests

Customer Impact

Before fix:
image

Accessibility providers:
[pid:10384,providerId:0x811196 Main:Nested [pid:10832,providerId:0x811196 Main(parent link):Microsoft: MSAA Proxy (unmanaged:UIAutomationCore.dll)]; Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]

Afrer fix:
image
Accessibility providers:
[pid:30620,providerId:0xD1472 Main:Nested [pid:52468,providerId:0xD1472 Main(parent link):Unidentified Provider (unmanaged:coreclr.dll)]; Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]

Regression?

  • No

Risk

  • Minimal

Test methodology

  • Unit tests
  • CTI team

Accessibility testing

  • Narrator
  • Inspect
  • Accessibility Insights

Test environment(s)

  • Microsoft Windows [Version 10.0.19041.388]
  • .NET Core SDK: 6.0.100-preview.3.21202.5
Microsoft Reviewers: Open in CodeFlow

@SergeySmirnov-Akvelon SergeySmirnov-Akvelon requested a review from a team as a code owner June 4, 2021 07:07
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch 2 times, most recently from 010cdd0 to 000e188 Compare June 4, 2021 08:25
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon added waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) waiting-review This item is waiting on review by one or more members of team labels Jun 7, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon changed the title Adding UIA support for TrackBar Adding UIA support for ScrollBar Jun 7, 2021
Copy link
Contributor

@RussKie RussKie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comments as for #4939

@RussKie RussKie added waiting-author-feedback The team requires more information from the author and removed waiting-review This item is waiting on review by one or more members of team labels Jun 7, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch from 000e188 to 9d38076 Compare June 15, 2021 11:27
@ghost ghost removed the waiting-author-feedback The team requires more information from the author label Jun 15, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch 3 times, most recently from 6e9596d to 9235595 Compare June 21, 2021 10:35
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch from 9235595 to f7e6986 Compare June 23, 2021 13:35
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch 3 times, most recently from 5fef8a5 to b939998 Compare July 1, 2021 12:56
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon added the waiting-review This item is waiting on review by one or more members of team label Jul 1, 2021
Copy link
Contributor

@Tanya-Solyanik Tanya-Solyanik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some questions about Enabled UIA property.

@Tanya-Solyanik Tanya-Solyanik added waiting-author-feedback The team requires more information from the author and removed waiting-review This item is waiting on review by one or more members of team labels Jul 2, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch from b939998 to af89ba5 Compare July 5, 2021 13:44
@ghost ghost removed the waiting-author-feedback The team requires more information from the author label Jul 5, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch from af89ba5 to c175e77 Compare July 5, 2021 14:33
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch from 421fcd2 to 6558e76 Compare July 6, 2021 08:45
@RussKie
Copy link
Contributor

RussKie commented Jul 7, 2021

Forgot to clean or push?
image

Also make sure it runs locally:

    System.Windows.Forms.Maui.IntegrationTests.WinformsMauiVScrollBarTests.MauiVScrollBarTests [FAIL]
      System.IO.FileNotFoundException : File does not exist
      Stack Trace:
        /_/src/System.Windows.Forms/tests/IntegrationTests/System.Windows.Forms.IntegrationTests.Common/TestHelpers.cs(53,0): at System.Windows.Forms.IntegrationTests.Common.TestHelpers.GetExePath(String projectName)
        /_/src/System.Windows.Forms/tests/IntegrationTests/System.Windows.Forms.Maui.IntegrationTests/MauiTestHelper.cs(40,0): at System.Windows.Forms.Maui.IntegrationTests.MauiTestHelper.GetScenarios(String projectName)
        /_/src/System.Windows.Forms/tests/IntegrationTests/System.Windows.Forms.Maui.IntegrationTests/MauiDataAttribute.cs(55,0): at System.Windows.Forms.Maui.IntegrationTests.MauiDataAttribute.GetData(MethodInfo testMethod)

@RussKie RussKie added the waiting-author-feedback The team requires more information from the author label Jul 7, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch from 08e7ce3 to 7228e67 Compare July 7, 2021 06:52
@ghost ghost removed the waiting-author-feedback The team requires more information from the author label Jul 7, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch from 7228e67 to cccd876 Compare July 7, 2021 07:28
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is IsDisplayed test copied from the previous implementation?

Is it possible to Invoke this object in the previous implementation when this button is not displayed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, the IsDisplayed flag, in addition to the fact that the element is invisible, means that the trackbar already has a minimum/maximum value and calling the Invoke method for element will not lead to any action.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please share an image of visual element that owns this accessible object?

IsDisplayed property seems to be very similar to Enabled, but I don't see why we would not want to navigate from a disabled element to its siblings....

How is navigation handled by the MSAA proxy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have investigated this case and found that if the element is invisible, than FragmentNavigate(NavigateDirection.Parent) method returns Parent correctly, but FragmentNavigate(NavigateDirection.NextSibling) and FragmentNavigate(NavigateDirection.PreviousSibling) methods return null value.

I fixed this case for ScrollBar and updated the tests. I also fixed this case for TrackBar.

The IsDisplayed property means that the ScrollBar has a minimum / maximum value. Therefore this element is invisible and does not require user interaction.

@Tanya-Solyanik
Copy link
Contributor

@DmitryGorokhov - see the before/after screenshots and red/green highlights to see when MSAA proxy is used and when our custom providers are

@SergeySmirnov-Akvelon SergeySmirnov-Akvelon marked this pull request as draft July 9, 2021 11:14
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon marked this pull request as ready for review July 9, 2021 11:15
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch 3 times, most recently from 8824ba6 to a5544c9 Compare July 12, 2021 09:44
Updated "SupportsUiaProviders" flag.

Added and implemented ScrollBar accessible objects

Added unit and MAUI tests.

Fixed "TrackBar.FragmentNavigate" method. Fixed unit tests
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon force-pushed the Issue-4983_Add_UIA_support_ScrollBar branch from a5544c9 to c95b8b4 Compare July 12, 2021 10:44
@dreddy-work
Copy link
Member

@Olina-Zhang

@dreddy-work dreddy-work added the waiting-author-feedback The team requires more information from the author label Jul 12, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon removed the waiting-for-testing The PR is awaiting manual testing by the primary team; no action is yet required from the author(s) label Jul 14, 2021
@ghost ghost removed the waiting-author-feedback The team requires more information from the author label Jul 14, 2021
@SergeySmirnov-Akvelon SergeySmirnov-Akvelon added the waiting-review This item is waiting on review by one or more members of team label Jul 14, 2021
@SergeySmirnov-Akvelon
Copy link
Contributor Author

Approved by CTI team

@dreddy-work dreddy-work added ready-to-merge PRs that are ready to merge but worth notifying the internal team. and removed waiting-review This item is waiting on review by one or more members of team labels Jul 14, 2021
@RussKie RussKie merged commit 6e6dabe into dotnet:main Jul 15, 2021
@RussKie RussKie deleted the Issue-4983_Add_UIA_support_ScrollBar branch July 15, 2021 02:38
@ghost ghost added this to the 6.0 Preview7 milestone Jul 15, 2021
@RussKie RussKie removed the ready-to-merge PRs that are ready to merge but worth notifying the internal team. label Jul 15, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ScrollBar control does not support UIA accessibility

5 participants