Git Product home page Git Product logo

Comments (6)

CooperCorona avatar CooperCorona commented on May 2, 2024 4

This is working as intended. The default SwiftUI project doesn't have any accessibility issues, so the tests pass. If you want to verify GTXiLib can catch issues, add
Circle().accessibilityElement() to your VStack. This will create a circle and make it an accessibility element. However, without any other accessibility information — such as an accessibility label — GTXiLib will mark it as a failure. If you added that line to your app, ran the app on a physical device, and turned on VoiceOver, you would be able to focus on the circle with VoiceOver, but it would not announce anything — an accessibility issue.

Try testing it with ContentView like:

VStack {
    Image(systemName: "globe")
        .imageScale(.large)
        .foregroundColor(.accentColor)
    Text("Hello, world!")
    Circle().accessibilityElement()
}
.padding()

from gtxilib.

CooperCorona avatar CooperCorona commented on May 2, 2024 4

Ah, try renaming override func setUpWithError() throws to override class func setUp(). Note the class keyword. setUpWithError is an instance method that runs after the test suite has initialized but before each individual test case. Hence, GTXTestSuite can't install itself, because the original test suite has already been installed. Moving that code to the class version of setUp, which runs once per test suite before the test suite runs, lets GTXiLib install itself properly.

from gtxilib.

CooperCorona avatar CooperCorona commented on May 2, 2024

I believe the 5.1.2 release of GTXiLib fixes the issue. It removes the C++ imports from the umbrella header, which broke Swift compatibility. Please try updating your Pods and building again. You may need to run pod cache clean --all or pod repo update to refresh the list of versions so CocoaPods uses the 5.1.2 release.

from gtxilib.

parikhparth23 avatar parikhparth23 commented on May 2, 2024

thank you @CooperCorona - adding the version worked fine.

one question though - when i try to run this test https://github.com/parikhparth23/gtxilib_a11y/blob/main/a11yTests/a11yTests.swift i dont see any Accessibility error

from gtxilib.

parikhparth23 avatar parikhparth23 commented on May 2, 2024

i added the Circle().accessibilityElement() to the VSTACK - https://github.com/parikhparth23/gtxilib_a11y/blob/main/a11y/ContentView.swift#L18

when i run on a physical device with the voiceover ON - it does not announce anything - what you suggested

But when i run the test - https://github.com/parikhparth23/gtxilib_a11y/blob/main/a11yTests/a11yTests.swift - GTXiLib is not marking it as a failure

from gtxilib.

parikhparth23 avatar parikhparth23 commented on May 2, 2024

awesome, thank you so much - its working as expected. closing this as resolved.
@CooperCorona do you mind adding more details on how to use it in the Readme.md - so its easy for others to use this awesome lib/framework? Please feel free to use the sample app/repo which i created.

will wait for your response / will close this issue at EOD today.

from gtxilib.

Related Issues (18)

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.