From 0488bebd8c004e803efee13bcd4fd9fddef028ab Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 8 May 2026 10:38:45 +0200 Subject: [PATCH] ConfirmRemovalForm: Drop autofocus entirely MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Besides that this is a destructive operation which shouldn't get automatic focus… our native way to adhere to WCAG standards is by focusing the newly rendered container which suffices. --- application/forms/ConfirmRemovalForm.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/application/forms/ConfirmRemovalForm.php b/application/forms/ConfirmRemovalForm.php index a837e14fc..eba6eef5d 100644 --- a/application/forms/ConfirmRemovalForm.php +++ b/application/forms/ConfirmRemovalForm.php @@ -22,19 +22,4 @@ class ConfirmRemovalForm extends Form $this->setName('form_confirm_removal'); $this->getSubmitLabel() ?: $this->setSubmitLabel($this->translate('Confirm Removal')); } - - /** - * {@inheritdoc} - */ - public function addSubmitButton() - { - parent::addSubmitButton(); - - if (($submit = $this->getElement('btn_submit')) !== null) { - $class = $submit->getAttrib('class'); - $submit->setAttrib('class', empty($class) ? 'autofocus' : $class . ' autofocus'); - } - - return $this; - } }