Git Product home page Git Product logo

gscxscanner's Introduction

What is Google Scanner for A11y?

Google Scanner for A11y abbreviated GSCX is a developer assistant, as an objective-C library it sits in an iOS app's process scanning it for issues to catch them before the developer even writes a test for them. The scanner comes built-in with checks for catching accessibility issues and supports an extensible plugin framework for adding your own checks.

Getting Started

To install the scanner into your app create a copy of your app target and add GSCXScanner library as a dependency to it.

Launch this new app target and your will notice a "Perform Scan" button overlaid on top of the app. Tap it and Scanner will scan you app and tell you if any issues are found.

WARNING You must not add this dependency directly to you app target but only to a copy of it so as to ensure you never ship your app with accessibility scanner installed on it.

One additional step needed will be to provide GTXiLib for the scanner framework to link to. If you have added static frameworks to your app previously, this process will be very familiar.

Installation Steps (Cocoapods)

You can use GSCXScanner pod to add a11y scanner to your app. For example:

For Objective-C projects:

target 'FooBarTarget' do
  use_frameworks!

  # Pods for FooBarTarget
  # ...
  pod 'GSCXScanner'
end

For Swift projects:

target 'FooBarTarget' do
  use_modular_headers!

  # Pods for FooBarTarget
  # ...
  pod 'GSCXScanner'
end

Note Objective-C projects have use_frameworks! but Swift projects have use_modular_headers!. As of CocoaPods 1.5.0, use_frameworks! is no longer required for Swift projects. use_frameworks! makes Abseil, which is a dependency of GTXiLib, fail to import properly. Thus, you cannot use use_frameworks!, which means you must use use_modular_headers!. You may also specify :modular_headers => true on a per-pod basis.

Launch your app to scan its UI

Launch your app and the GSCXScanner UI will appear overlaid on top of the app's UI. Use the app normally and at the point where you want to scan the app's UI for accessibility issues, just press the Scan button located at the bottom-left of the screen.

Plugins

Scanner is extendable, to customize scanner use GSCXScannerLib instead to the default scanner framework to avoid auto installing it on your app. and then customize it using the APIs in GSCXInstaller class.

Discuss

Please join us on the ios-accessibility Google group to discuss all things accessibility and also to keep a tab on all updates to Scanner.

Note: This is not an official Google product.

gscxscanner's People

Contributors

coopercorona avatar j-sid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gscxscanner's Issues

Tutorial Examples

Are there any examples, demos or videos of GSCXScanner use cases highlighting its features? The Google-group listings indicate there is a need for one on the topic to help adoption of this open source.

GSCXScanner fatal error: 'abseil/absl/strings/str_cat.h' file not found

This error happens when I try to build my app target that uses this pod.
Screenshot 2023-05-17 at 2 51 00 PM

I wonder if the issue is that GSCXScanner depends on GTXiLib v4.0.1 but that library is currently on v5.1.2 so something seems to have broken along the way.

Repro steps:

  1. Create a new Xcode project GSCXScannerDemo with SwiftUI on your desktop.
  2. In project select the target GSCXScannerDemo, right click and select Duplicate. Rename to GSCXScannerDemoCopy. Close Xcode.
  3. Open terminal and cd ~/Desktop/GSCXScannerDemo then pod init
  4. Open Podfile
  5. In target 'GSCXScannerDemoCopy' do add pod 'GSCXScanner'
  6. Close Podfile and in terminal run pod install
  7. Open GSCXScannerDemo.xcworkspace
  8. Build and run GSCXScannerDemo target - should build no problems.
  9. Build and run GSCXScannerDemoCopy target - should fail to build target GTXiLib with error 'abseil/absl/strings/str_cat.h' file not found for both xml_utils.cc and nearest_ancestor_relation_resource_id_generator.cc

FAQ for GSCXScanner

Need for a FAQ for GSCXScanner that answers basic adoption questions such as the following:

  • How does GSCXScanner work?

  • Are there any limitations?

  • How is GSCXScanner tool better than Apple's Accessibility Inspector? Is it better in terms of test automation, features provided, both?

  • How is GSCXScanner different from Worldspace Attest Mobile for iOS https://www.deque.com/blog/new-worldspace-attest-mobile-ios/

Scanner button doesn't appear in SwiftUI project

While running the target with GSCXScanner, I don't actually see the "Perform Scan" button or any output in the lldb debugger.

I also added an inaccessible view to my hierarchy but that doesn't seem to get flagged either. Looking at the project file and the target configuration I can see that libPods-GSCXScannerCopy.a is shown in the Frameworks, Libraries, and Embedded Content.

Screenshot 2023-05-18 at 9 37 03 AM

Maybe this is a UIScene-related bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.