solution.md

May 24, 2023 ยท View on GitHub

Solution overview

The code is organized into the following general areas:

Runtime components

These assemblies provide the interaction with UIA, as well as layers that allow the application to interact with that information in a more convenient way:

AssemblyResponsibility
Axe.Windows.ActionsProvide a high-level set of Actions that are the primary interface into the Runtime components.
Axe.Windows.CoreProvide classes, interfaces, and types used by projects throughout the Axe.Windows solution.
Axe.Windows.DesktopProvide Windows-specific implementations of the data abstractions found in Axe.Windows.Core. The low-level interactions with UIA occur in this assembly.
Axe.Windows.SystemAbstractionsProvides abstract classes for accessing system components, making it possible to unit test code that consumes the abstractions by using mocks
Axe.Windows.TelemetryProvides an interface which any caller can supply to capture telemetry from Axe.Windows
Axe.Windows.Win32Provide a wrapper around Win32-specific code that is needed by other assemblies.

Accessibility rules

These assemblies contain the automated tests used to evaluate the accessibility of an application. Please visit the Rules Overview for a detailed description of the automated accessibility tests.

AssemblyResponsibility
Axe.Windows.RulesProvide a library of rules, each of which scans a given element (or elements) for issues that are likely to be problematic. For example, a button without an accessible label will be flagged as an error.
Axe.Windows.RuleSelectionCoordinate rule execution in a consistent and reproducible way.

Application entry points

These assemblies allow user interaction with the Runtime components and the Accessibility Rules.

AssemblyResponsibility
Axe.Windows.AutomationProvide a layer that wraps key actions behind a simplified interface. This layer can be used to run Axe.Windows automated accessibility tests programmatically.

Command Line Interface (CLI)

ProjectResponsibility
CLIGenerates a command line interface (CLI) that allows Axe.Windows to be triggered from the command line. This CLI is a .NET Core 3.0 application and can be triggered from any framework that can launch processes. The .NET Core 3.0 runtime must be installed on the machine to use this version of the CLI.
CLI_FullBuilds the CLI project as a self-contained executable, so that it can be used in environments where the .NET Core 3.0 runtime is not already installed onto the machine.

Packaging

The packaging project exists to gather assemblies into their shipping vehicle:

ProjectResponsibility
CIBuilds the NuGet package that will be referenced by code that uses the library.
CLI_InstallerBuilds packages to distribute and install the CLI. The outputs are AxeWindowsCLI.msi (for use on machines where the .NET Core 3.0 runtime can conveniently be installed) and AxeWindowsCLI.zip (for use on machines where the .NET Core 3.0 runtimes can't conveniently be installed).

Tests

Note: Please use the Moq library when mocking interfaces. Do not use Microsoft Fakes because not all editions of Visual Studio support them.

The folllowing projects exist for testing purposes:

  • ActionsTests
  • AutomationTests
  • CLITests
  • CoreTests
  • CurrentFileVersionCompatibilityTests
  • DesktopTests
  • MsiFileTests
  • OldFileVersionCompatibilityTests
  • RuleSelectionTests
  • RulesTest
  • SystemAbstractionsTests
  • TelemetryTests
  • UnitTestSharedLibrary
  • Win32Tests

Documentation

The RulesMD project creates a tool to auto-generate RulesDescription.md. Any PR that modifies a rule should use this tool to incorporate the necessary changes to RulesDescription.md.

Build utility

The InteropDummy project provides a reliable way to consume the Interop.UIAutomationCore.Signed NuGet package as an embedded resource. This package provides types that are needed for custom UIA properties.