code: public function checkable()
      {
          $this->restrictElements(['input' => ['radio', 'checkbox']]);
  
          if (!in_array($this->element->getAttribute('type'), ['radio', 'checkbox'])) {
              throw new \RuntimeException('Element cannot be checked.');
          }
  
          self::debug(['%s'], [$this->element->getOuterHtml()]);
  
          $this->assert($this->element->isChecked(), 'checked');
      }
docs: Ensure that checkbox/radio button is checked.