import fnmatch


def ignore_rule_matches_result(ignore_rule, pa11y_result):
    """
    Returns a boolean result of whether the given ignore rule matches
    the given pa11y result. The rule only matches the result if *all*
    attributes of the rule match.
    """
    return all(
        fnmatch.fnmatch(pa11y_result.get(attr), ignore_rule.get(attr))
        for attr in ignore_rule.keys()
    )