How to use the xiblint.xibutils.view_accessibility_identifier function in xiblint

To help you get started, we’ve selected a few xiblint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lyft / xiblint / xiblint / rules / accessibility_format.py View on Github external
def get_accessibility_sources_by_id(accessibility_sources):
    """
    Gets a dictionary of accessibility sources keyed by their 'accessibilityFormatIdentifier'.
    """
    accessibility_sources_by_id = {}
    for source in accessibility_sources:
        accessibility_identifier = view_accessibility_identifier(source)
        if accessibility_identifier:
            accessibility_sources_by_id[accessibility_identifier] = source
    return accessibility_sources_by_id