Unable to inspect bottom sheet on iOS and Android


I am trying to write a test for a bottom sheet. I will click into the bottom sheet and complete the required fields.

When I inspect the elements for the bottom sheet, it is bringing the ID’s for the screen behind not the sheet itself. Has anyone come across this before?

The id’s are there (spoken to the devs within the team) but i cant locate them.
Checked versions etc, all up to date.

Any suggestions / advice would be appreciated thanks :slight_smile:

Probably, the elements aren’t defined as accessibility elements. Note that it is not that easy to make them accessible :sweat_smile:
Personally, I had issues with it as well, maybe there will be another developer here who’ll bring a bit more light on the subject and how to do it correctly…

But, if I remember correctly, UIKit elements are accessible by default, custom views can become a problem. You need to make each container view isAccessibilityElement = false and for its children set isAccessibilityElement = true

In the meanwhile, you can try to read this: https://developer.apple.com/documentation/accessibility
and this: https://developer.apple.com/documentation/uikit/accessibility_for_uikit

1 Like

Thank you so much! Will look in to the above and also speak to one of the devs in my team :slight_smile:

1 Like