Giter Site home page Giter Site logo

Comments (2)

caseyburkhardt avatar caseyburkhardt commented on April 27, 2024

Thanks for the report -- I'll take a look at what might be going on here. Just glancing at the layout, I believe I'd expect:

  • No result for id_test1, since it would be focused, but should have a spoken description of "foo" aggregated from the id_test3 TextView
  • A NOT_RUN result for id_test2 of RESULT_ID_NOT_IMPORTANT_FOR_ACCESSIBILITY
  • A NOT_RUN result for id_test3 of RESULT_ID_SHOULD_NOT_FOCUS, since id_test1 would be the focus-qualifying element which would include its text.

Would you share some info on how you're invoking SpeakableTextPresentCheck? Is this from an Espresso test, Accessibility Scanner, or something else?

from accessibility-test-framework-for-android.

Nancy945 avatar Nancy945 commented on April 27, 2024

Thanks for your reply.
I downloaded the source code and resolved the dependency problems.I did not change any key source code.
Then I ran the following code when a button clicked in a demo project without any test framework.

    Set<AccessibilityHierarchyCheck> checks =AccessibilityCheckPreset.getAccessibilityHierarchyChecksForPreset(AccessibilityCheckPreset.LATEST);
    AccessibilityHierarchy hierarchy = AccessibilityHierarchy.newBuilder(findViewById(R.id.id_test1)).build();
    List<AccessibilityHierarchyCheckResult> results = new ArrayList<>();
    for (AccessibilityHierarchyCheck check : checks) {
        if(check instanceof SpeakableTextPresentCheck){
            results.addAll(check.runCheckOnHierarchy(hierarchy));
        }
    }

and I get the result with 2 suggestions

id/id_test1,description:This item would not be focused by a screen reader
id/id_test2,description:This item was not found to be important for accessibility.

I can't understand the first suggestion, because I actually focused id_test1 when using talkback,and I know it is reasonable.

from accessibility-test-framework-for-android.

Related Issues (20)

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.