From be72ae8c493c7aa5afce972b56104a88f222b691 Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Thu, 3 Feb 2022 17:45:25 +0100 Subject: [PATCH] A11Y: Switch to using `autocomplete="off"` (#15802) --- .../addon/templates/components/admin-editable-field.hbs | 2 +- .../admin/addon/templates/components/simple-list.hbs | 5 +++-- .../admin/addon/templates/components/themes-list.hbs | 3 ++- .../discourse/app/components/search-text-field.js | 2 +- .../discourse/app/templates/components/composer-title.hbs | 2 +- .../discourse/app/templates/components/d-editor.hbs | 2 +- .../discourse/app/templates/components/emoji-picker.hbs | 3 ++- .../javascripts/discourse/app/templates/group-index.hbs | 2 +- .../javascripts/discourse/app/templates/invites/show.hbs | 2 +- .../discourse/app/templates/mobile/group-index.hbs | 2 +- .../discourse/app/templates/modal/create-account.hbs | 2 +- .../discourse/app/templates/user/bookmarks.hbs | 4 +++- .../templates/components/select-kit/select-kit-filter.hbs | 3 ++- app/assets/stylesheets/common/base/discourse.scss | 8 ++++++++ 14 files changed, 28 insertions(+), 14 deletions(-) diff --git a/app/assets/javascripts/admin/addon/templates/components/admin-editable-field.hbs b/app/assets/javascripts/admin/addon/templates/components/admin-editable-field.hbs index 7377a782b90..3dce5e6299a 100644 --- a/app/assets/javascripts/admin/addon/templates/components/admin-editable-field.hbs +++ b/app/assets/javascripts/admin/addon/templates/components/admin-editable-field.hbs @@ -1,7 +1,7 @@
{{i18n name}}
{{#if editing}} - {{text-field value=buffer autofocus="autofocus" autocomplete="discourse"}} + {{text-field value=buffer autofocus="autofocus" autocomplete="off"}} {{else}} {{value}} diff --git a/app/assets/javascripts/admin/addon/templates/components/simple-list.hbs b/app/assets/javascripts/admin/addon/templates/components/simple-list.hbs index 3e78f77b059..ab94ad2e39f 100644 --- a/app/assets/javascripts/admin/addon/templates/components/simple-list.hbs +++ b/app/assets/javascripts/admin/addon/templates/components/simple-list.hbs @@ -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") diff --git a/app/assets/javascripts/admin/addon/templates/components/themes-list.hbs b/app/assets/javascripts/admin/addon/templates/components/themes-list.hbs index ab342b1b930..5639dc42c1e 100644 --- a/app/assets/javascripts/admin/addon/templates/components/themes-list.hbs +++ b/app/assets/javascripts/admin/addon/templates/components/themes-list.hbs @@ -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"}} diff --git a/app/assets/javascripts/discourse/app/components/search-text-field.js b/app/assets/javascripts/discourse/app/components/search-text-field.js index cad882f85c5..520a90c5525 100644 --- a/app/assets/javascripts/discourse/app/components/search-text-field.js +++ b/app/assets/javascripts/discourse/app/components/search-text-field.js @@ -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) { diff --git a/app/assets/javascripts/discourse/app/templates/components/composer-title.hbs b/app/assets/javascripts/discourse/app/templates/components/composer-title.hbs index 56674525f17..55f7302f1e1 100644 --- a/app/assets/javascripts/discourse/app/templates/components/composer-title.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/composer-title.hbs @@ -5,7 +5,7 @@ placeholderKey=composer.titlePlaceholder aria-label=(I18n composer.titlePlaceholder) disabled=disabled - autocomplete="discourse" + autocomplete="off" }} {{popup-input-tip validation=validation}} diff --git a/app/assets/javascripts/discourse/app/templates/components/d-editor.hbs b/app/assets/javascripts/discourse/app/templates/components/d-editor.hbs index b424143c3da..c1be4f69785 100644 --- a/app/assets/javascripts/discourse/app/templates/components/d-editor.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/d-editor.hbs @@ -43,7 +43,7 @@ {{conditional-loading-spinner condition=loading}} {{d-textarea - autocomplete="discourse" + autocomplete="off" tabindex=tabindex value=value class="d-editor-input" diff --git a/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs b/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs index 5584b496d44..6de3a63fd31 100644 --- a/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs +++ b/app/assets/javascripts/discourse/app/templates/components/emoji-picker.hbs @@ -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") diff --git a/app/assets/javascripts/discourse/app/templates/group-index.hbs b/app/assets/javascripts/discourse/app/templates/group-index.hbs index 86aaea824b3..71c929e1379 100644 --- a/app/assets/javascripts/discourse/app/templates/group-index.hbs +++ b/app/assets/javascripts/discourse/app/templates/group-index.hbs @@ -4,7 +4,7 @@ {{text-field value=filterInput placeholderKey=filterPlaceholder - autocomplete="discourse" + autocomplete="off" class="group-username-filter no-blur" }} {{/if}} diff --git a/app/assets/javascripts/discourse/app/templates/invites/show.hbs b/app/assets/javascripts/discourse/app/templates/invites/show.hbs index cacd25edc79..cda2c355421 100644 --- a/app/assets/javascripts/discourse/app/templates/invites/show.hbs +++ b/app/assets/javascripts/discourse/app/templates/invites/show.hbs @@ -70,7 +70,7 @@ {{/if}}
- {{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"}}