Przeglądaj źródła

Always show the page editor title field’s border when the field is empty. Fix #9318 (#9719)

Thibaud Colas 2 lat temu
rodzic
commit
713636a00e

+ 1 - 0
CHANGELOG.txt

@@ -13,6 +13,7 @@ Changelog
  * Add ability to include `form_fields` as an APIField on `FormPage` (Sævar Öfjörð Magnússon, Suyash Singh, LB (Ben) Johnston)
  * Ensure that images listings are more consistently aligned when there are fewer images uploaded (Theresa Okoro)
  * Add more informative validation error messages for non-unique slugs within the admin interface and for programmatic page creation (Benjamin Bach)
+ * Always show the page editor title field’s border when the field is empty (Thibaud Colas)
  * Fix: Make sure workflow timeline icons are visible in high-contrast mode (Loveth Omokaro)
  * Fix: Ensure authentication forms (login, password reset) have a visible border in Windows high-contrast mode (Loveth Omokaro)
  * Fix: Ensure visual consistency between buttons and links as buttons in Windows high-contrast mode (Albina Starykova)

+ 3 - 1
client/scss/components/forms/_title.scss

@@ -32,7 +32,9 @@
     padding-inline-start: theme('spacing[1.5]');
     margin-inline-start: calc(-1 * theme('spacing[1.5]'));
 
-    &:not(:hover, :focus, [aria-invalid='true']) {
+    // Avoid calling attention to the field _unless_ it’s in one of those states.
+    &:not(:hover, :focus, :placeholder-shown, [aria-invalid='true']) {
+      // Hide w/ transparency to preserve border size and show it in forced-colors mode.
       border-color: transparent;
     }
   }

+ 1 - 0
docs/releases/4.2.md

@@ -23,6 +23,7 @@ depth: 1
  * Add ability to include [`form_fields` as an APIField](form_page_fields_api_field) on `FormPage` (Sævar Öfjörð Magnússon, Suyash Singh, LB (Ben) Johnston)
  * Ensure that images listings are more consistently aligned when there are fewer images uploaded (Theresa Okoro)
  * Add more informative validation error messages for non-unique slugs within the admin interface and for programmatic page creation (Benjamin Bach)
+ * Always show the page editor title field’s border when the field is empty (Thibaud Colas)
 
 ### Bug fixes