feat: add optional accessibility label scan parameters#124
Open
alexgerardojacinto wants to merge 5 commits into
Open
feat: add optional accessibility label scan parameters#124alexgerardojacinto wants to merge 5 commits into
alexgerardojacinto wants to merge 5 commits into
Conversation
Expose cancelButtonAccessibilityLabel, torchButtonOnAccessibilityLabel and torchButtonOffAccessibilityLabel in CapacitorBarcodeScannerOptions and forward them to OSBarcodeLib on Android (OSBarcodePlugin) and iOS (decoder). When omitted, no label is set.
TEMPORARY (do not publish): use the locally-built OSBarcodeLib AAR via implementation files() on Android and relax the iOS pod version pin so the local pod satisfies it, for testing the feat/RMET-5194/alternate-text library branch before release. Revert before publishing: restore the published io.ionic.libs:ionbarcode-android dependency and the 'OSBarcodeLib', '2.0.1' pod pin, and remove the bundled AAR.
…e [skip ci] TEMPORARY (do not publish as a real release): vendor the locally-built OSBarcodeLib so a dev build is self-contained and needs no published library. - iOS (CocoaPods): podspec vendors ios/Frameworks/OSBarcodeLib.xcframework - iOS (SwiftPM): Package.swift uses a binaryTarget for the xcframework - Android: build.gradle keeps implementation files(libs/OSBarcodeLib-release.aar) - package.json 'files' now ships android/libs/ and ios/Frameworks/ Revert all of this (restore the published io.ionic.libs:ionbarcode-android dep, the OSBarcodeLib pod dependency and the remote OSBarcodeLib-iOS SwiftPM package, and drop the bundled artifacts) before publishing a real release.
Demonstrate cancelButtonAccessibilityLabel, torchButtonOnAccessibilityLabel and torchButtonOffAccessibilityLabel in the example app's scanBarcode call.
Remove the temporary local-library scaffolding used for dev testing and point at the published library versions that include the accessibility feature: - Android: io.ionic.libs:ionbarcode-android:2.1.0@aar - iOS (CocoaPods): OSBarcodeLib 2.2.0 - iOS (SwiftPM): OSBarcodeLib-iOS from 2.2.0 The bundled AAR/xcframework and the package 'files' additions are dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the ability to set the alternative text (accessibility label) read by screen readers on the scanner's Cancel and Torch buttons, forwarding it to OSBarcodeLib.
CapacitorBarcodeScannerOptions:cancelButtonAccessibilityLabeltorchButtonOnAccessibilityLabeltorchButtonOffAccessibilityLabelOSBarcodePluginreads them and passes them toOSBARCScanParameters) and iOS (OSBARCScanParameters+Decodable). README regenerated via docgen.Context
An accessibility audit flagged that the Torch and Cancel buttons have no alternative text and are announced incorrectly by screen readers. RMET-5194.
Type of changes
Platforms affected
Tests
Checklist