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.
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.
Luisa supports macOS and Linux machines.
- Node.js LTS
- emscripten - Required for tree-sitter WASM compilation
- Rosetta 2 - If you're running on a macOS device with Apple silicon
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
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.
This project is licensed under MIT License, excepted where noted otherwise (such as the Swift file samples from external projects).
- Documentation - An anonymized version of the documentation can be found at deaccessibilizer.vercel.app.
- License