/** * Set the element to describe. * @param FluentHtmlElement $element that this description should describe * @return $this */ public function forElement(FluentHtmlElement $element) { $this->for_element = $element; $element->withAttribute('aria-describedby', function () { return $this->willRenderInHtml() ? $this->getId() : null; }); return $this; }