static get violationFilter() {
    return {
      // Different iron-iconset-svg can have children with the same id.
      'duplicate-id': function(nodeResult) {
        // Only safe to ignore if ALL dupe ids are children of iron-iconset-svg.
        return nodeResult.any.every(hit => {
          return hit.relatedNodes.every(node => {
            return CrExtensionsA11yTest.hasAncestor_(
                node.element, 'iron-iconset-svg');
          });
        });
      },
      'button-name': function(nodeResult) {
        const parentNode = nodeResult.element.parentNode;

        // Ignore the <button> residing within cr-toggle, which has tabindex -1
        // anyway.
        return parentNode && parentNode.host &&
            parentNode.host.tagName == 'CR-TOGGLE';
      },
    };
  }
// Default accessibility violation filter. Specify in test definition to use.
Default accessibility violation filter. Specify in test definition to use.
Default accessibility violation filter . Specify in test definition to use .
static get violationFilter() {
    return {
      'duplicate-id': function(nodeResult) {
        return nodeResult.any.every(hit => {
          return hit.relatedNodes.every(node => {
            return CrExtensionsA11yTest.hasAncestor_(
                node.element, 'iron-iconset-svg');
          });
        });
      },
      'button-name': function(nodeResult) {
        const parentNode = nodeResult.element.parentNode;
        return parentNode && parentNode.host &&
            parentNode.host.tagName == 'CR-TOGGLE';
      },
    };
  }
static get violationFilter ( ) { return { 'duplicate-id' : function ( nodeResult ) { return nodeResult . any . every ( hit => { return hit . relatedNodes . every ( node => { return CrExtensionsA11yTest . hasAncestor_ ( node . element , 'iron-iconset-svg' ) ; } ) ; } ) ; } , 'button-name' : function ( nodeResult ) { const parentNode = nodeResult . element . parentNode ; return parentNode && parentNode . host && parentNode . host . tagName == 'CR-TOGGLE' ; } , } ; }
Default accessibility violation filter.
Default accessibility violation filter .
// Different iron-iconset-svg can have children with the same id. // Only safe to ignore if ALL dupe ids are children of iron-iconset-svg. // Ignore the <button> residing within cr-toggle, which has tabindex -1 // anyway.