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

Conversation

@gspencergoog
Copy link
Contributor

@gspencergoog gspencergoog commented Nov 17, 2021

Description

This adds some accessibility improvements for reading out numbers. Currently this code is only used on Windows.

Related Issues

Tests

  • Updated tests to check for simplified output, and to provide better errors when failing.

@google-cla google-cla bot added the cla: yes label Nov 17, 2021
@gspencergoog gspencergoog force-pushed the a11y_number_formatting branch from 587cb8a to e352f4c Compare November 17, 2021 00:57
@gspencergoog gspencergoog force-pushed the a11y_number_formatting branch 2 times, most recently from 77fa193 to 31d0afc Compare December 2, 2021 07:56
@gspencergoog
Copy link
Contributor Author

@cbracken So... It appears that 1) the double-conversion library is already in the dart runtime, so linking it fails with duplicate symbols. I used it directly out of the runtime and that works. But, 2) it doesn't simplify, it's basically just a fast version of floating point to string conversion, and so the zero-stripping code is still needed.

I'm a little worried that we don't always want to convert to fixed point: e.g. if someone needed to hear the extra precision for something, then they're losing data, but I'm not sure that can be helped. Maybe I can switch to exponential if it's greater than 10^12 or less than 10^-6.

@gspencergoog gspencergoog force-pushed the a11y_number_formatting branch 3 times, most recently from ec5244a to ff9b055 Compare December 2, 2021 17:48
@cbracken
Copy link
Member

cbracken commented Dec 2, 2021

  1. the double-conversion library is already in the dart runtime, so linking it fails with duplicate symbols. I used it directly out of the runtime and that works.

Ah yep, it's used in Dart; that's right, I think we even discussed this at one point, but somehow this slipped my mind that we're linking into the same engine DLL. :/

  1. it doesn't simplify, it's basically just a fast version of floating point to string conversion, and so the zero-stripping code is still needed.

Could we grab the Chromium code that does the various cleanups into a little string utils library under third_party/accessibility/base?

@gspencergoog gspencergoog marked this pull request as ready for review December 3, 2021 21:33
@gspencergoog gspencergoog marked this pull request as draft December 3, 2021 21:35
@gspencergoog gspencergoog marked this pull request as ready for review December 3, 2021 21:36
@gspencergoog gspencergoog requested a review from cbracken December 3, 2021 21:36
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

LGTM modulo nits!

@gspencergoog gspencergoog force-pushed the a11y_number_formatting branch from c1a8925 to 051605e Compare December 4, 2021 02:11
@gspencergoog gspencergoog added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Dec 6, 2021
@fluttergithubbot
Copy link
Contributor

This pull request is not suitable for automatic merging in its current state.

  • The status or check suite Windows Unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

@fluttergithubbot fluttergithubbot removed the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Dec 6, 2021
@chinmaygarde chinmaygarde changed the title Accessibility number formatting improvements for WIndows Accessibility number formatting improvements for Windows Dec 9, 2021
@chinmaygarde chinmaygarde merged commit f4da7bf into flutter:main Dec 9, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 9, 2021
zanderso pushed a commit to flutter/flutter that referenced this pull request Dec 10, 2021
* 9de5f1a Roll Skia from c95c53ed0fcf to 44c81d149273 (2 revisions) (flutter/engine#30248)

* f4da7bf Accessibility number formatting improvements for Windows (flutter/engine#29773)

* 79f750d Roll Fuchsia Mac SDK from EcjcLVqar... to 9asn8qJFp... (flutter/engine#30249)
gspencergoog added a commit to gspencergoog/engine that referenced this pull request Dec 10, 2021
gspencergoog added a commit to gspencergoog/engine that referenced this pull request Dec 13, 2021
gspencergoog added a commit that referenced this pull request Dec 14, 2021
) (#30301)

This reverts commit 33f4c32 to re-land the previous change in #29773.
Chinmay realized that because we link the whole engine into one DLL on Windows, the export settings for the symbols don't affect this code: If we include a second copy of the double-conversion library, the duplicate symbols are all internal to the DLL. Consequently, we need to link to the copy in the Dart runtime, so this is the correct implementation. If the Dart team decides to change/remove the library in the future, we will need to add in our own copy at that time.

This adds some accessibility improvements for reading out numbers. Currently this code is only used on Windows.
@cbracken cbracken mentioned this pull request Feb 11, 2022
8 tasks
cbracken added a commit that referenced this pull request Feb 12, 2022
This enables accessibility unittests on Windows as part of our CI testing.

It also corrects two unit tests which were fixed by
#29773, which fixed
flutter/flutter#78460.

Finally it disables an AXFragmentRoot test that times out. We don't use
AXFragmentRoot in Flutter as it's only used with UI Automation APIs,
which Flutter does not use (we use MSAA).

Issue: flutter/flutter#98225
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.

[a11y] Improve formatting of decimals in base::NumberToString()

4 participants