Skip to content
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

Add AXE testing to test suite #3764

Merged
merged 23 commits into from
Dec 15, 2021

Conversation

marcelwgn
Copy link
Collaborator

Description

This PR enables AXE testing allowing us to essentially run Accessibility Insights on the controls as part of the CI.

Because of that we need two package changes:

  • Add Axe.Windows to the list of available Nuget packages (using 1.0.4 right now)
  • Upgrade Microsoft.Win32.Registry to the required version (4.7.0 would be required for 1.0.4)

Motivation and Context

Allows detecting of a11y issues during development using the a11y detection engine of Accessibility Insights

How Has This Been Tested?

Ran tests in question.

Screenshots (if appropriate):

@YuliKl @ranjesh @StephenLPeters FYI

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Dec 4, 2020
Comment on lines 14 to 20
<!-- These ALL fail our axe scanning so we comment them out. -->
<!--
<muxc:NumberBox Header="Sample NumberBox"/>
<muxc:NumberBox AutomationProperties.Name="Sample NumberBox"/>
<muxc:NumberBox Header="Sample NumberBox" SpinButtonPlacementMode="Inline"/>
<muxc:NumberBox Header="Sample NumberBox" SpinButtonPlacementMode="Compact"/>
-->
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

NumberBox doesn't forward header or AutomationProperties.Name to the internal textbox, resulting in a missing UIA name for the internl "edit". @YuliKl @teaP FYI

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this already has an issue... #3505


In reply to: 536034266 [](ancestors = 536034266)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh right, forgot about that issue. I'll remove the code then.

@@ -39,7 +39,8 @@
<StackPanel Orientation="Horizontal">
<Button x:Name="BackButton" Margin="0,0,4,0"
Style="{ThemeResource AccentButtonStyle}"
AutomationProperties.AutomationId="__BackButton"
AutomationProperties.AutomationId="__BackButton"
AutomationProperties.Name="Back"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Needed to add that since otherwise, Axe would always return at least one a11y issue.

docs/developer_guide.md Outdated Show resolved Hide resolved
@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcelwgn
Copy link
Collaborator Author

@StephenLPeters CI failed since the required NuGet packages are not available in the WinUI dependency repository.

@StephenLPeters StephenLPeters added area-TestInfrastructure Issue in the test infrastructure (e.g. in Helix scripts) team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Dec 5, 2020
@StephenLPeters
Copy link
Contributor

@kmahone Can you remind us the process of getting the nuget package into the dependencies?

@kmahone
Copy link
Member

kmahone commented Dec 5, 2020

@kmahone Can you remind us the process of getting the nuget package into the dependencies?

nuget push mypackage.nupkg -Source https://pkgs.dev.azure.com/ms/microsoft-ui-xaml/_packaging/MUX-Dependencies/nuget/v3/index.json -ApiKey az

@marcelwgn
Copy link
Collaborator Author

@StephenLPeters @ranjeshj Is there anything on my side that needs to be changed for this PR?

@ranjeshj ranjeshj requested a review from kmahone February 5, 2021 16:12
@ranjeshj
Copy link
Contributor

ranjeshj commented Feb 5, 2021

@chingucoding Apologies on the delay. Can you sync with master ? There have been quite a few changes since this PR.

@marcelwgn
Copy link
Collaborator Author

Merged with master now.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@karkarl
Copy link
Contributor

karkarl commented Dec 9, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcelwgn
Copy link
Collaborator Author

Looks like the tests failed for a non build problem, I'll take a look tomorrow and see if and how I can fix it :)

@marcelwgn
Copy link
Collaborator Author

Thank you for all your help @karenbtlai !

@karkarl
Copy link
Contributor

karkarl commented Dec 10, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcelwgn
Copy link
Collaborator Author

@karenbtlai Do you think that the code to retrieve the process ID could be broken with TAEF, i.e. if could retrieve the process ID of a process with the same name spawned by TAEF (and MSTest tests happen to work)?

@karkarl
Copy link
Contributor

karkarl commented Dec 13, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@karkarl
Copy link
Contributor

karkarl commented Dec 13, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@karkarl karkarl force-pushed the user/chingucoding/axe-testing branch from d084ee1 to 7c106ae Compare December 13, 2021 21:39
@karkarl
Copy link
Contributor

karkarl commented Dec 13, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@karkarl
Copy link
Contributor

karkarl commented Dec 14, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@karkarl
Copy link
Contributor

karkarl commented Dec 14, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@karkarl karkarl merged commit fa28e62 into microsoft:main Dec 15, 2021
@marcelwgn marcelwgn deleted the user/chingucoding/axe-testing branch January 19, 2022 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TestInfrastructure Issue in the test infrastructure (e.g. in Helix scripts) team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants