Skip to content

Instantly share code, notes, and snippets.

@konrness
Created June 19, 2013 18:27
Show Gist options
  • Save konrness/5816636 to your computer and use it in GitHub Desktop.
Save konrness/5816636 to your computer and use it in GitHub Desktop.
Adding aria-labelledby attributes to the errors of a form eelement.
$this->addElement(
$this->createElement('password', 'mypassword')
->setLabel('My Password')
->setRequired(true)
);
$this->getElement('mypassword')
->getDecorator('errors')
->setOption('aria-labelledby', 'mypassword');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment