Skip to content

Conversation

@miquelbeltran
Copy link
Member

@miquelbeltran miquelbeltran commented Jan 9, 2020

Description

Add the highContrast property to the FakeAccessibilityFeatures class.

The highContrast is going to be added to the class AccessibilityFeatures in the PR: flutter/engine#15343

Design change document: https://docs.google.com/document/d/1kePVlqWvJu5Ph0RL6wgg67F3SATmsJ8QY5N0S1MvaGg/edit

Related Issues

Related to #48418
Depends on flutter/engine#15343

Tests

  • The value is added to FakeAccessibilityFeatures which is used in the Window and MediaQueryData tests.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

I don't know how to use Flutter Analyze with a custom Flutter Engine, so I can't make it pass.

Test pass when I use my custom Flutter Engine.

Breaking Change

Did any tests fail when you ran them? Please read [Handling breaking changes].

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@fluttergithubbot fluttergithubbot added the framework flutter/packages/flutter repository. See also f: labels. label Jan 9, 2020
@fluttergithubbot
Copy link
Contributor

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@fluttergithubbot fluttergithubbot added the a: tests "flutter test", flutter_test, or one of our tests label Jan 10, 2020
@Piinks Piinks added a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) platform-ios iOS applications specifically and removed a: tests "flutter test", flutter_test, or one of our tests labels Jan 10, 2020
@Piinks
Copy link
Contributor

Piinks commented Jan 10, 2020

Hi @miquelbeltran! Welcome 🎉 and thank you for the contribution! I've checked in on the engine change this depends on. :)

@fluttergithubbot fluttergithubbot added the a: tests "flutter test", flutter_test, or one of our tests label Jan 12, 2020
@miquelbeltran miquelbeltran changed the title Add support for Increase Contrast on iOS Add highContrast to FakeAccessibilityFeatures test Jan 14, 2020
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Thanks for splitting this out to land without breaking! :)

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

I am inclined to approve. @LongCatIsLooong, you had mentioned this being similar to another feature in flutter/engine#15343. @miquelbeltran provided some feedback there on that, do you have any objections to this change moving forward?

@dnfield
Copy link
Contributor

dnfield commented Jan 15, 2020

We should land the change in the engine before landing this.

We should separately land a change to the framework to make FakeAccessibilityFeatures override noSuchMethod so that the engine will bea ble to roll the change into the framework. See the way we do it on TestWindow for an example.

@Piinks
Copy link
Contributor

Piinks commented Jan 15, 2020

@dnfield is right. I forgot that the engine will complain when you add highContrast and it isn't overridden.

Here is the example of NoSuchMethod @dnfield mentioned:

/// This gives us some grace time when the dart:ui side adds something to

Adding that will actually open the door to making changes like this easier in the future! :)

@miquelbeltran
Copy link
Member Author

Sorry for the delay, I have added now the noSuchMethod override.

@LongCatIsLooong
Copy link
Contributor

Could you pull changes from upstream again? That should fix the test failure.

miquelbeltran and others added 4 commits February 19, 2020 08:06
Reference ticket: #48418

Requires changes from the flutter/engine project.

Instead of a hard-coded false, read the value from the
window.accessibilityFeatures.

Add highContrast to fake window test
Reverted highContrast value, will be included in a new Pull-Request

Co-Authored-By: Kate Lovett <katelovett@google.com>
@miquelbeltran
Copy link
Member Author

Done!

Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

This LGTM! Thank you for your continued work on this! 🎉

@Piinks
Copy link
Contributor

Piinks commented Feb 19, 2020

Once this lands, we should be able to move on to the follow-up engine change you have staged in flutter/engine#15343 :)

@fluttergithubbot fluttergithubbot merged commit d295fbb into flutter:master Feb 19, 2020
@miquelbeltran miquelbeltran deleted the mb-48418-highcontrast branch February 20, 2020 10:15
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. platform-ios iOS applications specifically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants