Commit e3746d44 authored by Oliver Bartsch's avatar Oliver Bartsch Committed by Frank Nägler
Browse files

[BUGFIX] Add focus to user confirmation password field

Since #92836 backend users have to confirm their
password on accessing the install tool in the backend.

The corresponding password field now properly gets
the focus assigned. This improves the accessibility,
especially for keyboard users who otherwise had to
tab through the whole module menu first.

Resolves: #92895
Releases: master, 10.4, 9.5
Change-Id: I001f851b3730a864923c73a766026ed18d9c5466
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66773

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: Daniel Haupt's avatarDaniel Haupt <mail@danielhaupt.de>
Tested-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
Reviewed-by: Markus Klein's avatarMarkus Klein <markus.klein@typo3.org>
Reviewed-by: Daniel Haupt's avatarDaniel Haupt <mail@danielhaupt.de>
Reviewed-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
parent a5dff712
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
import DocumentService = require('TYPO3/CMS/Core/DocumentService');
class BackendUserConfirmation {
constructor() {
DocumentService.ready().then((): void => this.addFocusToFormInput());
}
private addFocusToFormInput(): void {
const confirmationPasswordField: HTMLElement = document.getElementById('confirmationPassword');
if (confirmationPasswordField !== null) {
confirmationPasswordField.focus();
}
}
}
export = new BackendUserConfirmation();
......@@ -3,6 +3,8 @@
xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
data-namespace-typo3-fluid="true">
<f:be.pageRenderer includeRequireJsModules="{0: 'TYPO3/CMS/Install/BackendUserConfirmation'}" />
<be:moduleLayout>
<div class="modal-backdrop in"></div>
<div class="modal modal-severity-warning modal-size-small" tabindex="-1" role="dialog" style="display: block;">
......
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
define(["require","exports","TYPO3/CMS/Core/DocumentService"],(function(e,o,t){"use strict";return new class{constructor(){t.ready().then(()=>this.addFocusToFormInput())}addFocusToFormInput(){const e=document.getElementById("confirmationPassword");null!==e&&e.focus()}}}));
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment