mirror of
https://github.com/wekan/wekan.git
synced 2026-01-20 00:06:09 +01:00
Fix DOMPurify paths. Part 4.
Thanks to xet7 !
This commit is contained in:
parent
a85479f73c
commit
2119c6ab0c
4 changed files with 128 additions and 9 deletions
|
|
@ -52,14 +52,6 @@ template(name="userFormsLayout")
|
|||
else
|
||||
// ARIA live region for error messages
|
||||
div#login-error-message(role="alert" aria-live="assertive" style="color: #d32f2f; margin-bottom: 1em;")
|
||||
// Add autocomplete attribute to login input for WCAG compliance
|
||||
script.
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
var loginInput = document.querySelector('input[type="text"], input[type="email"]');
|
||||
if (loginInput && loginInput.name && (loginInput.name.toLowerCase().includes('user') || loginInput.name.toLowerCase().includes('email'))) {
|
||||
loginInput.setAttribute('autocomplete', 'username email');
|
||||
}
|
||||
});
|
||||
+Template.dynamic(template=content)
|
||||
if currentSetting.displayAuthenticationMethod
|
||||
+connectionMethod(authenticationMethod=currentSetting.defaultAuthenticationMethod)
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@ Template.userFormsLayout.onRendered(() => {
|
|||
validator,
|
||||
);
|
||||
EscapeActions.executeAll();
|
||||
|
||||
// Add autocomplete attribute to login input for WCAG compliance
|
||||
const loginInput = document.querySelector('input[type="text"], input[type="email"]');
|
||||
if (loginInput && loginInput.name && (loginInput.name.toLowerCase().includes('user') || loginInput.name.toLowerCase().includes('email'))) {
|
||||
loginInput.setAttribute('autocomplete', 'username email');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue