From 57325ce4479aa97209be39da957ab41fe8746744 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Tue, 2 Jul 2024 10:21:04 +0100
Subject: [PATCH] Issue #3418999 by quietone: Correct spelling of autocomplete
 type words

---
 core/misc/autocomplete.js                            |  4 ++--
 core/misc/cspell/dictionary.txt                      |  3 ---
 .../Drupal/Nightwatch/Tests/claroAutocompleteTest.js |  5 ++++-
 .../css/components/autocomplete-loading.module.css   | 12 +++++++-----
 .../components/autocomplete-loading.module.pcss.css  | 12 +++++++-----
 core/themes/claro/js/autocomplete.js                 |  2 ++
 6 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/core/misc/autocomplete.js b/core/misc/autocomplete.js
index 590620e1b103..d4938fccdd95 100644
--- a/core/misc/autocomplete.js
+++ b/core/misc/autocomplete.js
@@ -148,7 +148,7 @@
   }
 
   /**
-   * Handles an autocompletefocus event.
+   * Handles an autocomplete focus event.
    *
    * @return {boolean}
    *   Always returns false.
@@ -158,7 +158,7 @@
   }
 
   /**
-   * Handles an autocompleteselect event.
+   * Handles an autocomplete select event.
    *
    * @param {jQuery.Event} event
    *   The event triggered.
diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt
index 7af7945d2046..304c8da17b6e 100644
--- a/core/misc/cspell/dictionary.txt
+++ b/core/misc/cspell/dictionary.txt
@@ -20,9 +20,6 @@ arrowstop
 arrowthick
 arrowthickstop
 assertable
-autocompletefocus
-autocompleteselect
-autocompleting
 autoconfiguration
 autoconfigured
 autocreate
diff --git a/core/tests/Drupal/Nightwatch/Tests/claroAutocompleteTest.js b/core/tests/Drupal/Nightwatch/Tests/claroAutocompleteTest.js
index 4f6674d2be25..6b1213d59deb 100644
--- a/core/tests/Drupal/Nightwatch/Tests/claroAutocompleteTest.js
+++ b/core/tests/Drupal/Nightwatch/Tests/claroAutocompleteTest.js
@@ -1,3 +1,5 @@
+// cspell:ignore is-autocompleting
+
 module.exports = {
   '@tags': ['core'],
 
@@ -28,7 +30,8 @@ module.exports = {
       .waitForElementVisible('body', 1000);
 
     // Tests that entering a character from the
-    // data-autocomplete-first-character-blacklist doesn't start autocompleting.
+    // data-autocomplete-first-character-blacklist doesn't start the
+    // autocomplete process.
     browser
       .setValue('[name="autocomplete_4"]', '/')
       .pause(1000)
diff --git a/core/themes/claro/css/components/autocomplete-loading.module.css b/core/themes/claro/css/components/autocomplete-loading.module.css
index 65f713085beb..45a71dea3f4c 100644
--- a/core/themes/claro/css/components/autocomplete-loading.module.css
+++ b/core/themes/claro/css/components/autocomplete-loading.module.css
@@ -12,6 +12,8 @@
  * @see autocomplete.js
  */
 
+/* cspell:ignore is-autocompleting */
+
 /**
  * Since the autocomplete library is attached conditionally and not globally,
  * we can be 99% sure that the default icon will be used.
@@ -19,14 +21,14 @@
  * autocomplete input's background — until are sure that it will be pushed by
  * the server with HTTP/2.
  *
- * The autocompleting (active) state's background-image is inlined because
- * non-used CSS selectors are usually ignored; popular browsers don't download
- * their 'url' references.
+ * The active autocomplete state's background-image is inlined because non-used
+ * CSS selectors are usually ignored; popular browsers don't download their
+ * 'url' references.
  * If these selectors become active, the browser needs some time for painting
  * previously ignored remote asset: it should get it from server, parse it and
  * repaint the background of autocomplete field. With the inlined background we
  * can prevent an additional timeout caused by a new request/response pair.
- * Besides this, the autocompleting event itself may easily finish before the
+ * Besides this, the autocomplete event itself may easily finish before the
  * missing asset gets downloaded/parsed/painted, and the missing instant visual
  * feedback would be a usability/accessibility issue as well.
  */
@@ -53,7 +55,7 @@
 }
 
 /**
- * Autocomplete wrapper for autocompleting message.
+ * Autocomplete wrapper for autocomplete message.
  */
 
 .claro-autocomplete {
diff --git a/core/themes/claro/css/components/autocomplete-loading.module.pcss.css b/core/themes/claro/css/components/autocomplete-loading.module.pcss.css
index 5cf8c80873e4..b4323d79e8fa 100644
--- a/core/themes/claro/css/components/autocomplete-loading.module.pcss.css
+++ b/core/themes/claro/css/components/autocomplete-loading.module.pcss.css
@@ -5,6 +5,8 @@
  * @see autocomplete.js
  */
 
+/* cspell:ignore is-autocompleting */
+
 /**
  * Since the autocomplete library is attached conditionally and not globally,
  * we can be 99% sure that the default icon will be used.
@@ -12,14 +14,14 @@
  * autocomplete input's background — until are sure that it will be pushed by
  * the server with HTTP/2.
  *
- * The autocompleting (active) state's background-image is inlined because
- * non-used CSS selectors are usually ignored; popular browsers don't download
- * their 'url' references.
+ * The active autocomplete state's background-image is inlined because non-used
+ * CSS selectors are usually ignored; popular browsers don't download their
+ * 'url' references.
  * If these selectors become active, the browser needs some time for painting
  * previously ignored remote asset: it should get it from server, parse it and
  * repaint the background of autocomplete field. With the inlined background we
  * can prevent an additional timeout caused by a new request/response pair.
- * Besides this, the autocompleting event itself may easily finish before the
+ * Besides this, the autocomplete event itself may easily finish before the
  * missing asset gets downloaded/parsed/painted, and the missing instant visual
  * feedback would be a usability/accessibility issue as well.
  */
@@ -50,7 +52,7 @@
 }
 
 /**
- * Autocomplete wrapper for autocompleting message.
+ * Autocomplete wrapper for autocomplete message.
  */
 .claro-autocomplete {
   position: relative;
diff --git a/core/themes/claro/js/autocomplete.js b/core/themes/claro/js/autocomplete.js
index e77659869b7d..26fa80122c30 100644
--- a/core/themes/claro/js/autocomplete.js
+++ b/core/themes/claro/js/autocomplete.js
@@ -3,6 +3,8 @@
  * Claro's enhancement for autocomplete form element.
  */
 
+// cspell:ignore is-autocompleting
+
 (($, Drupal, once) => {
   Drupal.behaviors.claroAutoCompete = {
     attach(context) {
-- 
GitLab