code: function accessibleText(node) {
    switch (node.nodeType) {
      case Node.ELEMENT_NODE:
        if (
          isText(node.getAttribute('alt')) ||
          isText(node.getAttribute('aria-label')) ||
          isText(node.getAttribute('title'))
        )
          return true
        for (let i = 0; i < node.childNodes.length; i++) {
          if (accessibleText(node.childNodes[i])) return true
        }
        break
      case Node.TEXT_NODE:
        return isText(node.data)
    }
  }
docs: Public: Check if an element has text visible by sight or screen reader.  Examples  <img alt="github" src="github.png"> # => true  <span aria-label="Open"></span> # => true  <button></button> # => false  Returns String text.