Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@darrenaustin
Copy link
Contributor

Simple change to add support for the Semantics.header field on Android. Android P added a AccessibilityNodeInfo.setHeading function, so this just hooks that up to our Semantic tree.

Fixes: flutter/flutter#41494

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good.

/cc @jonahwilliams for if this can be tested with our existing infrastructure.

@mklim
Copy link
Contributor

mklim commented Oct 25, 2019

Thank you for the contribution!

This can be unit tested with JUnit, but it is unfortunately painful right now because of our mix of unique build system and no dependency injection in the Java code. See the README for instructions on adding a test. It would probably be preferable to test this with a flutter driver test if possible, but I'm not totally sure if that's possible (as is this wouldn't create any changes that Flutter driver could test).

Change itself also LG, but all patches need to be tested unless there's a personal exemption from Hixie (#4). So this is blocked until we have one for it.

@darrenaustin
Copy link
Contributor Author

Yeah, testing this has been something I have been looking into. Jonah suggested that I look at the integration tests that are in the main flutter tree:

https://github.com/flutter/flutter/tree/master/dev/integration_tests/android_semantics_testing

Would adding something to these tests for this feature be sufficient, or do we require unit tests in the engine itself? Thx.

@mklim
Copy link
Contributor

mklim commented Oct 25, 2019

Oh, neat.

Would adding something to these tests for this feature be sufficient, or do we require unit tests in the engine itself? Thx.

I think integration tests are generally better since they actually verify that it works in a way that unit tests don't. If it's possible to test it that way I'd prefer it.

@cbracken
Copy link
Member

cbracken commented Nov 4, 2019

Given that (AFAIK) we don't have devicelab devices with accessibility enabled, is the plan here to add some, then take that approach?

@jonahwilliams
Copy link
Contributor

We do actually, see flutter/flutter#44031

@darrenaustin
Copy link
Contributor Author

Ok, I have landed the integration test for this (flutter/flutter#44031), can I get an approval to push this to master?

Copy link
Contributor

@mklim mklim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@darrenaustin darrenaustin merged commit 3ea4005 into flutter:master Nov 5, 2019
@darrenaustin darrenaustin deleted the semantic_android_heading branch November 5, 2019 23:27
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 6, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Nov 6, 2019
git@github.com:flutter/engine.git/compare/05ab04dbe8cf...6c763bb

git log 05ab04d..6c763bb --no-merges --oneline
2019-11-06 fmil@google.com [fuchsia] Temporarily disable intl provider (flutter/engine#13696)
2019-11-05 matthew-carroll@users.noreply.github.com Fix plugin registrant reflection path. (#44161) (flutter/engine#13698)
2019-11-05 darrenaustin@google.com Added Semantic header support on Android. (flutter/engine#13262)


If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC garyq@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider implementing "Accessibility Headings" API hook for Android

6 participants