From 430a37653c3f07639c2353cc1d75109877f5acb5 Mon Sep 17 00:00:00 2001 From: LB Johnston Date: Thu, 18 Jan 2024 07:21:35 +1000 Subject: [PATCH] Remove non-functional and inaccessible auto-focus on first field in page create forms --- CHANGELOG.txt | 1 + docs/releases/6.0.md | 1 + wagtail/admin/templates/wagtailadmin/pages/create.html | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1b90e4ea59..7a7c6ac664 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -116,6 +116,7 @@ Changelog * Maintenance: Migrate styleguide ad-hoc JavaScript to use styles only to avoid CSP issues (LB (Ben) Johnston) * Maintenance: Update Jest version - frontend tooling (Nandini Arora) * Maintenance: Add more CSS authoring guidelines (Thibaud Colas) + * Maintenance: Remove non-functional and inaccessible auto-focus on first field in page create forms (LB (Ben) Johnston) 5.2.3 (xx.xx.xxxx) - IN DEVELOPMENT diff --git a/docs/releases/6.0.md b/docs/releases/6.0.md index b54f30dfb5..ec40d11da0 100644 --- a/docs/releases/6.0.md +++ b/docs/releases/6.0.md @@ -162,6 +162,7 @@ Thank you to Thibaud Colas and Badr Fourane for their work on this feature. * Remove inline script usage for comment initialization and adopt an event listener/dispatch approach for better CSP compliance (Aditya, LB (Ben) Johnston) * Migrate styleguide ad-hoc JavaScript to use styles only to avoid CSP issues (LB (Ben) Johnston) * Update Jest version - frontend tooling (Nandini Arora) + * Remove non-functional and inaccessible auto-focus on first field in page create forms (LB (Ben) Johnston) ## Upgrade considerations - removal of deprecated features from Wagtail 4.2 - 5.1 diff --git a/wagtail/admin/templates/wagtailadmin/pages/create.html b/wagtail/admin/templates/wagtailadmin/pages/create.html index ecb1a6351c..da0505b0c1 100644 --- a/wagtail/admin/templates/wagtailadmin/pages/create.html +++ b/wagtail/admin/templates/wagtailadmin/pages/create.html @@ -56,8 +56,6 @@ {% endif %} $(function(){ - $('#page-edit-form .tab-content section.active input').first().trigger('focus'); - /* Make user confirm before leaving the editor if there are unsaved changes */ {% trans "This page has unsaved changes." as confirmation_message %} enableDirtyFormCheck(