r.length) {
    return false;
  }

  if (!str.includes('-')) {
    return false;
  }

  let first = true;
  for (const c of str) {
    const codePoint = c.codePointAt(0);
    if (first) {
      if (!isAsciiLowerAlpha(codePoint)) {
        return false;
      }
      first = false;
    }
    if (isAsciiUpperAlpha(codePoint)) {
      return false;
    }
  }

  return elementLocalNameRegex.test(str);
}

// In order to test the branching logic of valid element local names and the
// requirement of having a '-' 