code: def check_title_match(expected_title, pa11y_results, logger):
      
      if not pa11y_results:
          # no output from pa11y, nothing to check.
          return
      title_errs = [err for err in pa11y_results
                    if err["context"].startswith("<title")]
      for err in title_errs:
          title_elmt = html.fragment_fromstring(err["context"])
          # pa11ycrawler will elide the title, so grab whatever true
          # content we can from the output
          elided_title = title_elmt.text.strip()
          if elided_title.endswith("..."):
              pa11y_title = elided_title[0:-4].strip()
          else:
              pa11y_title = elided_title
  
          # check that they match -- the elided version should be a substring
          # of the full version
          if pa11y_title not in expected_title:
              # whoa, something's screwy!
              msg = (
                  u'Parser mismatch! '
                  u'Scrapy saw full title "{scrapy_title}", '
                  u'Pa11y saw elided title "{elided_title}".'
              ).format(
                  scrapy_title=expected_title, elided_title=elided_title,
              )
              logger.error(msg)
docs: Check if Scrapy reports any issue with the HTML <title> element.
      If so, compare that <title> element to the title that we got in the
      A11yItem. If they don't match, something is screwy, and pa11y isn't
      parsing the page that we expect.