From a25d096bf5881e3f7a7a3fa26a74ee637bd2b846 Mon Sep 17 00:00:00 2001 From: Crash0v3rrid3 Date: Thu, 18 Dec 2025 17:23:25 +0530 Subject: [PATCH 1/3] [JIRA DEVA11Y-179] Updated documentation --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 259661c..cde7bd5 100644 --- a/README.md +++ b/README.md @@ -51,17 +51,17 @@ Run the following command at the **root of your repository** Zsh ```zsh -curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/zsh/spm.sh" && chmod 0775 browserstack-a11y-scan-spm.sh +curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/zsh/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-zsh.sh ``` Bash ```bash -curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/bash/spm.sh" && chmod 0775 browserstack-a11y-scan-spm.sh +curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/bash/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-bash.sh ``` Fish ```fish -curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/fish/spm.sh" && chmod 0775 browserstack-a11y-scan-spm.sh +curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/fish/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-fish.sh ``` #### Disable Sandboxing - In Xcode, select first item (project root) in the left folder tree and go to Build Settings tab From 7f0e6a9359dc1c533751ee24003bed3f631d9b54 Mon Sep 17 00:00:00 2001 From: Crash0v3rrid3 Date: Wed, 14 Jan 2026 16:19:15 +0530 Subject: [PATCH 2/3] Updated readme --- .gitignore | 3 +- README.md | 80 ++++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 58 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 1be12cb..417803e 100644 --- a/.gitignore +++ b/.gitignore @@ -61,4 +61,5 @@ Thumbs.db typings/ yarn-debug.log* yarn-error.log* -TestProject/ \ No newline at end of file +TestProject/ +.sot \ No newline at end of file diff --git a/README.md b/README.md index cde7bd5..328b396 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # AccessibilityDevTools -A Swift Package Manager (SPM) command plugin that scans your iOS Swift codebase for accessibility issues using BrowserStack’s Accessibility DevTools rule engine. +A Swift Package Manager (SPM) command plugin and CLI tool that scans your iOS Swift codebase for accessibility issues using BrowserStack’s Accessibility DevTools rule engine. -AccessibilityDevTools enables static accessibility linting directly inside Xcode via SwiftPM, helping teams catch WCAG violations early—before UI tests, QA, or production. +AccessibilityDevTools enables static accessibility linting directly inside Xcode, via SwiftPM, or using the standalone BrowserStack CLI, helping teams catch WCAG violations early—before UI tests, QA, or production. --- ## 🚀 Key Capabilities @@ -12,8 +12,8 @@ AccessibilityDevTools enables static accessibility linting directly inside Xcode --- ## Supported projects types -1. Projects created with XCode -2. Projects created with Swift package manager +1. Projects created with Swift package manager +2. Projects created with XCode --- ## Authentication @@ -51,21 +51,18 @@ Run the following command at the **root of your repository** Zsh ```zsh -curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/zsh/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-zsh.sh +curl -L -o browserstack-a11y-scan-spm-zsh.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/zsh/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-zsh.sh ``` Bash ```bash -curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/bash/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-bash.sh +curl -L -o browserstack-a11y-scan-spm-bash.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/bash/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-bash.sh ``` Fish -```fish -curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/fish/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-fish.sh +```bash +curl -L -o browserstack-a11y-scan-spm-fish.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/fish/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-fish.sh ``` -#### Disable Sandboxing -- In Xcode, select first item (project root) in the left folder tree and go to Build Settings tab -- Search for `sandbox` > Set `User script sandboxing` to “NO” #### Add a Build Phase Repeat these steps for each target in your project @@ -75,10 +72,23 @@ Repeat these steps for each target in your project ![Build Phase](./resources/build-phase.png "Build Phase") 3. Drag this newly created build phase above **Compile Sources** step 4. Delete any existing code in the newly created build step and add the following code -5. Add this script: +5. Add this script, depending upon the shell you picked earlier: + +Zsh +```zsh +./browserstack-a11y-scan-spm-zsh.sh --include **/*.swift --non-strict ``` -./browserstack-a11y-scan-spm.sh --include **/*.swift --non-strict + +Bash +```bash +./browserstack-a11y-scan-spm-bash.sh --include **/*.swift --non-strict +``` + +Fish +```bash +./browserstack-a11y-scan-spm-fish.sh --include **/*.swift --non-strict ``` + Xcode will now automatically run the accessibility scan during builds. ### 2. Projects created with Swift package manager @@ -120,23 +130,19 @@ Run the following command at the **root of your repository** Zsh ```zsh -curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/zsh/spm.sh" && chmod 0775 browserstack-a11y-scan-spm.sh +curl -L -o browserstack-a11y-scan-spm-zsh.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/zsh/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-zsh.sh ``` Bash ```bash -curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/bash/spm.sh" && chmod 0775 browserstack-a11y-scan-spm.sh +curl -L -o browserstack-a11y-scan-spm-bash.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/bash/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-bash.sh ``` Fish -```fish -curl -L -o browserstack-a11y-scan-spm.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/fish/spm.sh" && chmod 0775 browserstack-a11y-scan-spm.sh +```bash +curl -L -o browserstack-a11y-scan-spm-fish.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/fish/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-fish.sh ``` -#### Disable Sandboxing -- In Xcode, select first item (project root) in the left folder tree and go to Build Settings tab -- Search for `sandbox` > Set `User script sandboxing` to “NO” - #### Add a Build Phase Repeat these steps for each target in your project @@ -145,10 +151,23 @@ Repeat these steps for each target in your project ![Build Phase](./resources/build-phase.png "Build Phase") 3. Drag this newly created build phase above **Compile Sources** step 4. Delete any existing code in the newly created build step and add the following code. -5. Add this script: +5. Add this script, depending upon the shell you picked earlier: + +Zsh +```zsh +./browserstack-a11y-scan-spm-zsh.sh --include **/*.swift --non-strict +``` + +Bash +```bash +./browserstack-a11y-scan-spm-bash.sh --include **/*.swift --non-strict ``` -./browserstack-a11y-scan-spm.sh --include **/*.swift --non-strict + +Fish +```bash +./browserstack-a11y-scan-spm-fish.sh --include **/*.swift --non-strict ``` + Xcode will now automatically run the accessibility scan during builds. --- @@ -163,9 +182,22 @@ Press Cmd + B to build the project. --- ## Register pre-commit hook You can run accessibility checks automatically before each commit by running the following command. + +Zsh +```zsh +./browserstack-a11y-scan-spm-zsh.sh register-pre-commit-hook +``` + +Bash ```bash -./browserstack-a11y-scan-spm.sh register-pre-commit-hook +./browserstack-a11y-scan-spm-bash.sh register-pre-commit-hook ``` + +Fish +```bash +./browserstack-a11y-scan-spm-fish.sh register-pre-commit-hook +``` + You can then edit the `.git/hooks/pre-commit` file to customise the registered pre-commit hook. --- From 22211be5cb87005d87277cf9e3a2af18df326d9f Mon Sep 17 00:00:00 2001 From: Crash0v3rrid3 Date: Wed, 14 Jan 2026 16:31:15 +0530 Subject: [PATCH 3/3] Added sandboxing documentation and reverted support proj types order --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 328b396..45d53c3 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ AccessibilityDevTools enables static accessibility linting directly inside Xcode --- ## Supported projects types -1. Projects created with Swift package manager -2. Projects created with XCode +1. Projects created with XCode +2. Projects created with Swift package manager --- ## Authentication @@ -64,6 +64,10 @@ Fish curl -L -o browserstack-a11y-scan-spm-fish.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/fish/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-fish.sh ``` +#### Disable Sandboxing +1. In Xcode project, select first item (project root) in the left folder tree and go to Build Settings tab +2. Search for sandbox > Set user script sandboxing to “NO” + #### Add a Build Phase Repeat these steps for each target in your project @@ -143,6 +147,10 @@ Fish curl -L -o browserstack-a11y-scan-spm-fish.sh "https://raw.githubusercontent.com/browserstack/AccessibilityDevTools/refs/heads/main/scripts/fish/spm.sh" && chmod 0775 browserstack-a11y-scan-spm-fish.sh ``` +#### Disable Sandboxing +1. In Xcode project, select first item (project root) in the left folder tree and go to Build Settings tab +2. Search for sandbox > Set user script sandboxing to “NO” + #### Add a Build Phase Repeat these steps for each target in your project