Fix accessibility of the Autosubmit decorator when applied to a form

refs #7935
This commit is contained in:
Johannes Meyer 2015-03-03 14:35:46 +01:00
parent c2339d156b
commit 8510835fba
1 changed files with 3 additions and 5 deletions

View File

@ -99,13 +99,11 @@ class Autosubmit extends Zend_Form_Decorator_Abstract
? t('Upon any of this form\'s fields were changed, this page is being updated automatically.')
: t('Upon its value has changed, this field issues an automatic update of this page.');
$content .= $this->getView()->icon('cw', $warning, array(
'aria-hidden' => 'true',
'aria-hidden' => $isForm ? 'false' : 'true',
'class' => 'autosubmit-warning'
));
if ($this->getAccessible()) {
$content = $isForm
? $content . '<span id="' . $this->getWarningId() . '" class="sr-only">' . $warning . '</span>'
: '<span id="' . $this->getWarningId() . '" class="sr-only">' . $warning . '</span>' . $content;
if (! $isForm && $this->getAccessible()) {
$content = '<span id="' . $this->getWarningId() . '" class="sr-only">' . $warning . '</span>' . $content;
}
$content .= sprintf(