RevenueCat / purchases-ios

In-app purchases and subscriptions made easy. Support for iOS, watchOS, tvOS, macOS, and visionOS.
https://www.revenuecat.com/
MIT License
2.22k stars 295 forks source link

Hide decorative Paywall images from accessibility. #3886

Closed shiftingsand closed 2 months ago

shiftingsand commented 2 months ago

Motivation

The paywall template I'm using (five) displays a decorative image but the image isn't marked as decorative to accessibility. In my particular test case that meant that VoiceOver could access it, but there was no audible description of what the image actually was.

Normally I would change Image() to Image(decorative: ), but since that wasn't possible I used .accessibilityHidden(true).

Description

Added .accessibilityHidden(true) to the two images in RemoteImage. I initially was hesitant to change RemoteImage itself, but went ahead and did so since it seems to be only used by the Paywall templates.

shiftingsand commented 2 months ago

Thank you so much. Happy to help!