A11Y: Switch to using autocomplete="off" (#15802)

This commit is contained in:
Penar Musaraj 2022-02-03 17:45:25 +01:00 committed by GitHub
parent 2d7e2b3810
commit be72ae8c49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 28 additions and 14 deletions

View File

@ -1,7 +1,7 @@
<div class="field">{{i18n name}}</div>
<div class="value">
{{#if editing}}
{{text-field value=buffer autofocus="autofocus" autocomplete="discourse"}}
{{text-field value=buffer autofocus="autofocus" autocomplete="off"}}
{{else}}
<a href {{action "edit"}} class="inline-editable-field">
<span>{{value}}</span>

View File

@ -26,9 +26,10 @@
value=newValue
placeholderKey="admin.site_settings.simple_list.add_item"
class="add-value-input"
autocomplete="discourse"
autocomplete="off"
autocorrect="off"
autocapitalize="off"}}
autocapitalize="off"
}}
{{d-button
action=(action "addValue")

View File

@ -20,7 +20,8 @@
{{input
class="filter-input"
placeholder=(i18n "admin.customize.theme.filter_placeholder")
autocomplete="discourse"
autocomplete="off"
type="search"
value=(mut filterTerm)
}}
{{d-icon "search"}}

View File

@ -4,7 +4,7 @@ import TextField from "discourse/components/text-field";
import { applySearchAutocomplete } from "discourse/lib/search";
export default TextField.extend({
autocomplete: "discourse-search",
autocomplete: "off",
@discourseComputed("searchService.searchContextEnabled")
placeholder(searchContextEnabled) {

View File

@ -5,7 +5,7 @@
placeholderKey=composer.titlePlaceholder
aria-label=(I18n composer.titlePlaceholder)
disabled=disabled
autocomplete="discourse"
autocomplete="off"
}}
{{popup-input-tip validation=validation}}

View File

@ -43,7 +43,7 @@
{{conditional-loading-spinner condition=loading}}
{{d-textarea
autocomplete="discourse"
autocomplete="off"
tabindex=tabindex
value=value
class="d-editor-input"

View File

@ -24,7 +24,8 @@
class="filter"
name="filter"
placeholder=(i18n "emoji_picker.filter_placeholder")
autocomplete="discourse"
autocomplete="off"
type="search"
autocorrect="off"
autocapitalize="off"
input=(action "onFilter")

View File

@ -4,7 +4,7 @@
{{text-field
value=filterInput
placeholderKey=filterPlaceholder
autocomplete="discourse"
autocomplete="off"
class="group-username-filter no-blur"
}}
{{/if}}

View File

@ -70,7 +70,7 @@
{{/if}}
<div class="input username-input input-group">
{{input value=accountUsername class=(value-entered accountUsername) id="new-account-username" name="username" maxlength=maxUsernameLength autocomplete="discourse"}}
{{input value=accountUsername class=(value-entered accountUsername) id="new-account-username" name="username" maxlength=maxUsernameLength autocomplete="off"}}
<label class="alt-placeholder" for="new-account-username">
{{i18n "user.username.title"}}
<span class="required">*</span>

View File

@ -2,7 +2,7 @@
{{text-field
value=filterInput
placeholderKey=filterPlaceholder
autocomplete="discourse"
autocomplete="off"
class="group-username-filter no-blur"
}}

View File

@ -49,7 +49,7 @@
maxlength=maxUsernameLength
aria-describedby="username-validation"
aria-invalid=usernameValidation.failed
autocomplete="discourse"
autocomplete="off"
}}
<label class="alt-placeholder" for="new-account-username">
{{i18n "user.username.title"}}

View File

@ -12,7 +12,9 @@
value=searchTerm
placeholder=(i18n "bookmarks.search_placeholder")
enter=(action "search")
id="bookmark-search" autocomplete="discourse"}}
id="bookmark-search"
autocomplete="off"
}}
{{d-button
class="btn-primary"
action=(action "search")

View File

@ -4,7 +4,7 @@
tabindex=0
class="filter-input"
placeholder=placeholder
autocomplete="discourse"
autocomplete="off"
autocorrect="off"
autocapitalize="off"
name="filter-input-search"
@ -14,6 +14,7 @@
paste=(action "onPaste")
keyDown=(action "onKeydown")
keyUp=(action "onKeyup")
type="search"
}}
{{#if selectKit.options.filterIcon}}

View File

@ -230,6 +230,14 @@ input {
}
}
input[type="search"] {
&::-webkit-search-cancel-button,
&::-webkit-search-decoration {
-webkit-appearance: none;
appearance: none;
}
}
// Fixes Safari height inconsistency
::-webkit-datetime-edit {
display: inline;