rebelappstudio / accessibility_tools

MIT License
70 stars 4 forks source link

Add option to include `AccessibilityTools` in release mode #36

Open vincevargadev opened 1 year ago

vincevargadev commented 1 year ago

We have internal builds (think of TestFlight, Firebase App Tester) of our app that we use within the company's app team, including product managers, designers, and QA.

I'd like to be able to add the AccessibilityTools to our app in non-debug mode, if a toggle in the internal menu is enabled. This should help QA, for example, to spot accessibility issues more easily.

Unfortunately, currently the tool only runs in debug mode which is only helpful for developers, not for QA and other internal testers, as only developers run the app in debug mode.

The tools only run in debug mode, and are compiled out of release builds.

Please consider adding an option (e.g. bool forceInNonDebugMode or similar) that lets users of the package include the AccessibilityTools and its features in release and profile mode, too.

This same issue has been brought up in another issue by @SAGARSURI, too: https://github.com/rebelappstudio/accessibility_tools/issues/22#issuecomment-1525934806

I'm happy to open a PR if you think this is something you would merge.

aednlaxer commented 1 year ago

Hi Vince,

Thanks for your feature request. Soon we're planning to add a flag that would make it possible to have AccessibilityTools available in release mode.

aednlaxer commented 11 months ago

Looks like it's not possible to do this without making quite big changes in the core of this plugin.

While adding a flag for enabling AccessibilityTools widget in release mode is trivial, implementing semantic checks in release mode is more difficult. Accessibility tools use properties which are available in debug mode only: RenderObject.debugSemantics, RenderObject.debugCreator. I couldn't find a way to get access to both render object and corresponding semantics tree node. Having access to both is required for semantic checks to work.

Feel free to open a PR if you can find a way to implement these changes.