Unable to find accessibility id for couple of elements both on Android and IOS using appium inspector

Hi,
There is one particular screen in my Mobile Hybrid App both on Android and IOS where I am unable to inspect the accessibility id for an HTML link and an Image(message unread badge) which has been added by the developer team using a .JS library.
Most of the accessibility id in the application has been added using the same .js library and Appium is able to find the id’s except for the above 2 elements
I tried using the Appium Capability snapshotMaxDepth but still Appium inspector is unable to find the accessibility id’s for these element.
Can someone please suggest a work around for the same ?