Skip to content

A tool to remove accessibility features and degrade SwiftUI components to assist mutation testing and learning.

License

Notifications You must be signed in to change notification settings

Erick2280/luisa-deaccessibilizer

Repository files navigation

Luisa: Leveraging User Interfaces in SwiftUI for Accessibility Training

Build workflow status Tests workflow status Test coverage

Luisa is a tool designed to modify codebases by intentionally removing accessibility features and degrading SwiftUI components, violating WCAG 2.2 guidelines. It can generate samples for mutation testing and assist in teaching accessibility best practices and how to identify issues.

Luisa's code modification is powered by a set of mutation operators. Each operator targets specific code patterns in .swift files and applies a degradation. You can find the source code of each operator, along with its expected behavior and targeted WCAG success it aims to violate, in the /src/mutating/operators/ folder or in the documentation.

Luisa uses tree-sitter and the tree-sitter-swift grammar to generate a syntax tree of a .swift source code file. Each mutation operator contains a query written in the tree-sitter query syntax to match specific code patterns, along with instructions on how to modify them.

Usage

Luisa can be used as a module for either Node.js and web environments (through the use of WebAssembly), or standalone as a CLI tool.

Prerequisites

Luisa supports macOS and Linux machines.

Required dependencies

macOS quick install

Ensure you have homebrew and Node.js LTS installed in your machine.

# Install from homebrew
brew install emscripten

# Apple Silicon only: Install Rosetta 2
softwareupdate --install-rosetta

As a module

In the browser

If you're installing Luisa to use it as part of a web page, the tree-sitter.wasm and tree-sitter-swift.wasm files (compiled to dist/ when you install this module) should be available from the root directory of your web server.

License

This project is licensed under MIT License, excepted where noted otherwise (such as the Swift file samples from external projects).

Links

  • Documentation - An anonymized version of the documentation can be found at deaccessibilizer.vercel.app.
  • License

Acknowledgements

About

A tool to remove accessibility features and degrade SwiftUI components to assist mutation testing and learning.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published