Add accessibility annotation check (#3926)

This commit is contained in:
Adrian Cojocaru
2025-11-05 12:57:17 +02:00
committed by GitHub
parent 467f3ca57f
commit 05b06a6926

View File

@@ -3550,7 +3550,12 @@ static void *windowScreenContext = &windowScreenContext;
- (id)accessibilityElementForAnnotationWithTag:(MLNAnnotationTag)annotationTag
{
MLNAssert(_annotationContextsByAnnotationTag.count(annotationTag), @"Missing annotation for tag %llu.", annotationTag);
MLNAnnotationContext &annotationContext = _annotationContextsByAnnotationTag.at(annotationTag);
auto annotationContextIt = _annotationContextsByAnnotationTag.find(annotationTag);
if (annotationContextIt == _annotationContextsByAnnotationTag.end()) {
return nil;
}
MLNAnnotationContext &annotationContext = annotationContextIt->second;
id <MLNAnnotation> annotation = annotationContext.annotation;
// Let the annotation view serve as its own accessibility element.