Skip to content

Commit

Permalink
Merge pull request #40978 from nextcloud/fix/37092/replace-non-standa…
Browse files Browse the repository at this point in the history
…rd-autocorrect-with-spellcheck

HTML Validation: replace non standard `autocorrect` with `spellcheck`
  • Loading branch information
susnux authored Oct 19, 2023
2 parents 06327be + 2d6cd78 commit 8ac6fe8
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 39 deletions.
4 changes: 2 additions & 2 deletions apps/settings/src/components/PasswordSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
:value.sync="oldPass"
autocomplete="current-password"
autocapitalize="none"
autocorrect="off" />
spellcheck="false" />

<NcPasswordField id="new-pass"
:label="t('settings', 'New password')"
:value.sync="newPass"
:maxlength="469"
autocomplete="new-password"
autocapitalize="none"
autocorrect="off"
spellcheck="false"
:check-password-strength="true" />

<NcButton type="primary"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
:value="email"
:aria-describedby="helperText ? `${inputId}-helper-text` : ''"
autocapitalize="none"
autocorrect="off"
spellcheck="false"
@input="onEmailChange">

<div class="email__actions-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
rows="8"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
spellcheck="false"
@input="onPropertyChange" />
<input v-else
:id="inputId"
Expand All @@ -45,7 +45,7 @@
:value="value"
:aria-describedby="helperText ? `${name}-helper-text` : ''"
autocapitalize="none"
autocorrect="off"
spellcheck="false"
:autocomplete="autocomplete"
@input="onPropertyChange">

Expand Down
8 changes: 4 additions & 4 deletions apps/settings/src/components/Users/NewUserModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
:label="usernameLabel"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
spellcheck="false"
pattern="[a-zA-Z0-9 _\.@\-']+"
required />
<NcTextField class="modal__item"
Expand All @@ -46,7 +46,7 @@
:label="t('settings', 'Display name')"
autocapitalize="none"
autocomplete="off"
autocorrect="off" />
spellcheck="false" />
<span v-if="!settings.newUserRequireEmail"
id="password-email-hint"
class="modal__hint">
Expand All @@ -62,7 +62,7 @@
:label="newUser.mailAddress === '' ? t('settings', 'Password (required)') : t('settings', 'Password')"
autocapitalize="none"
autocomplete="new-password"
autocorrect="off"
spellcheck="false"
:required="newUser.mailAddress === ''" />
<NcTextField class="modal__item"
data-test="email"
Expand All @@ -72,7 +72,7 @@
:label="newUser.password === '' || settings.newUserRequireEmail ? t('settings', 'Email (required)') : t('settings', 'Email')"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
spellcheck="false"
:required="newUser.password === '' || settings.newUserRequireEmail" />
<div class="modal__item">
<!-- hidden input trick for vanilla html5 form validation -->
Expand Down
3 changes: 0 additions & 3 deletions apps/settings/src/components/Users/UserRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
:value.sync="editedDisplayName"
autocapitalize="off"
autocomplete="off"
autocorrect="off"
spellcheck="false"
@trailing-button-click="updateDisplayName" />
</template>
Expand Down Expand Up @@ -82,7 +81,6 @@
:value.sync="editedPassword"
autocapitalize="off"
autocomplete="new-password"
autocorrect="off"
required
spellcheck="false"
type="password"
Expand All @@ -105,7 +103,6 @@
:value.sync="editedMail"
autocapitalize="off"
autocomplete="email"
autocorrect="off"
spellcheck="false"
type="email"
@trailing-button-click="updateEmail" />
Expand Down
4 changes: 2 additions & 2 deletions apps/user_ldap/templates/renewpassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<p class="grouptop">
<input type="password" id="oldPassword" name="oldPassword"
placeholder="<?php echo $l->t('Current password');?>"
autofocus autocomplete="off" autocapitalize="off" autocorrect="off" required/>
autofocus autocomplete="off" autocapitalize="off" spellcheck="false" required/>
<label for="oldPassword" class="infield"><?php p($l->t('Current password')); ?></label>
</p>

Expand All @@ -39,7 +39,7 @@
<label id="newPassword-label" for="newPassword" class="infield"><?php p($l->t('New password')); ?></label>
<input type="password" id="newPassword" name="newPassword"
placeholder="<?php echo $l->t('New password');?>"
data-typetoggle="#personal-show" autofocus autocomplete="off" autocapitalize="off" autocorrect="off" required/>
data-typetoggle="#personal-show" autofocus autocomplete="off" autocapitalize="off" spellcheck="false" required/>
</p>

<input type="submit" id="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Renew password')); ?>"/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/login/UpdatePassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
name="password"
autocomplete="new-password"
autocapitalize="none"
autocorrect="off"
spellcheck="false"
required
:placeholder="t('core', 'New password')">
</p>
Expand Down
16 changes: 8 additions & 8 deletions core/templates/installation.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
<label for="adminlogin"><?php p($l->t('Username')); ?></label>
<input type="text" name="adminlogin" id="adminlogin"
value="<?php p($_['adminlogin']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off" autofocus required>
autocomplete="off" autocapitalize="none" spellcheck="false" autofocus required>
</p>
<p class="groupbottom">
<label for="adminpass"><?php p($l->t('Password')); ?></label>
<input type="password" name="adminpass" data-typetoggle="#show" id="adminpass"
value="<?php p($_['adminpass']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off" required>
autocomplete="off" autocapitalize="none" spellcheck="false" required>
<button id="show" class="toggle-password" aria-label="<?php p($l->t('Show password')); ?>">
<img src="<?php print_unescaped(image_path('', 'actions/toggle.svg')); ?>" alt="<?php p($l->t('Toggle password visibility')); ?>">
</button>
Expand All @@ -64,7 +64,7 @@
<input type="text" name="directory" id="directory"
placeholder="<?php p(OC::$SERVERROOT.'/data'); ?>"
value="<?php p($_['directory']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off">
autocomplete="off" autocapitalize="none" spellcheck="false">
</div>
</fieldset>
<?php endif; ?>
Expand Down Expand Up @@ -103,13 +103,13 @@
<label for="dbuser"><?php p($l->t('Database user')); ?></label>
<input type="text" name="dbuser" id="dbuser"
value="<?php p($_['dbuser']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off">
autocomplete="off" autocapitalize="none" spellcheck="false">
</p>
<p class="groupmiddle">
<label for="dbpass"><?php p($l->t('Database password')); ?></label>
<input type="password" name="dbpass" id="dbpass"
value="<?php p($_['dbpass']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off">
autocomplete="off" autocapitalize="none" spellcheck="false">
<button id="show" class="toggle-password" aria-label="<?php p($l->t('Show password')); ?>">
<img src="<?php print_unescaped(image_path('', 'actions/toggle.svg')); ?>" alt="<?php p($l->t('Toggle password visibility')); ?>">
</button>
Expand All @@ -118,7 +118,7 @@
<label for="dbname"><?php p($l->t('Database name')); ?></label>
<input type="text" name="dbname" id="dbname"
value="<?php p($_['dbname']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off"
autocomplete="off" autocapitalize="none" spellcheck="false"
pattern="[0-9a-zA-Z$_-]+">
</p>
<?php if ($_['hasOracle']): ?>
Expand All @@ -127,15 +127,15 @@
<label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label>
<input type="text" name="dbtablespace" id="dbtablespace"
value="<?php p($_['dbtablespace']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off">
autocomplete="off" autocapitalize="none" spellcheck="false">
</p>
</div>
<?php endif; ?>
<p class="groupbottom">
<label for="dbhost"><?php p($l->t('Database host')); ?></label>
<input type="text" name="dbhost" id="dbhost"
value="<?php p($_['dbhost']); ?>"
autocomplete="off" autocapitalize="none" autocorrect="off">
autocomplete="off" autocapitalize="none" spellcheck="false">
</p>
<p class="info">
<?php p($l->t('Please specify the port number along with the host name (e.g., localhost:5432).')); ?>
Expand Down
2 changes: 1 addition & 1 deletion core/templates/publicshareauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
<input type="password" name="password" id="password"
placeholder="<?php p($l->t('Password')); ?>" value=""
autocomplete="new-password" autocapitalize="off" autocorrect="off"
autocomplete="new-password" autocapitalize="off" spellcheck="false"
autofocus />
<input type="hidden" name="sharingToken" value="<?php p($_['share']->getToken()) ?>" id="sharingToken">
<input type="hidden" name="sharingType" value="<?php p($_['share']->getShareType()) ?>" id="sharingType">
Expand Down
4 changes: 2 additions & 2 deletions dist/core-login.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-login.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-users-8351.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-users-8351.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-vue-settings-apps-users-management.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-apps-users-management.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-vue-settings-personal-info.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-personal-info.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/settings-vue-settings-personal-password.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-personal-password.js.map

Large diffs are not rendered by default.

0 comments on commit 8ac6fe8

Please sign in to comment.