Skip to content

Support value announcement for increase/decrease - #12741

Merged
goderbauer merged 5 commits into
flutter:masterfrom
goderbauer:mergeincrease
Oct 31, 2017
Merged

goderbauer merged 5 commits into
flutter:masterfrom
goderbauer:mergeincrease

Conversation

@goderbauer

Copy link
Copy Markdown
Member

/// If non-null, sets the [SemanticsNode.increasedValue] semantic to the given
/// value.
///
/// The text's reading direction is given by [textDirection].

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"The reading direction is given by [textDirection]."
(yours is grammatically correct, just awkward to read)

Fix here and in packages/flutter/lib/src/rendering/semantics.dart, it seems to have replicated itself in a bunch of places.

///
/// This must not be null if [label], [hint], or [value] is not null.
/// This must not be null if [label], [hint], [value], [increasedValue], or
/// [decreasedValue] is not null.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"are not null"

///
/// If a value is provided, [onIncrease] must also be set and there must
/// either be an ambient [Directionality] or an explicit [textDirection]
/// has to be provided.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"has to be" --> "must be"

and below.

semantics.dispose();
});

testWidgets('Increased/decreased values are annotated', (WidgetTester tester) async {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If it's possible to test, it would be good to test that some of the complex assertions are in place. For example, trying to give null to increasedValue, or supply one and not the other, etc.

@gspencergoog

Copy link
Copy Markdown
Contributor

lgtm

@goderbauer
goderbauer merged commit 9184dfb into flutter:master Oct 31, 2017
@goderbauer
goderbauer deleted the mergeincrease branch October 31, 2017 21:22
@goderbauer goderbauer added the a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) label Mar 5, 2018
DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
* Support value announcment for increase/decrease

* ++

* review comments about docs
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 12, 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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants