From 9693f08812fdc48510252120b3107c2245f1c49f Mon Sep 17 00:00:00 2001 From: Giteabot Date: Tue, 19 Dec 2023 16:40:03 +0800 Subject: [PATCH] Fix duplicate ID when deleting repo (#28520) (#28528) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport #28520 by @framitdavid There is an accessibility issue in the interface when attempting to delete a repository. When I click on "Delete repository," a dialog box appears, requiring confirmation to proceed with the repository deletion. However, when I press the "Repo name" label, the wrong input field gains focus. The focused field is located behind the dialog and is intended for renaming the repository. I am submitting these pull requests to ensure that the correct input field is focused when the user clicks on the label. This change will also facilitate the writing of tests using Playwright or Testing Library to retrieve elements based on roles. This PR will also improve acessibility of this area. Co-authored-by: David Øvrelid <46874830+framitdavid@users.noreply.github.com> (cherry picked from commit 932e282e153ca30f6afaac738469137b761cf904) --- templates/repo/migrate/migrating.tmpl | 4 ++-- templates/repo/settings/options.tmpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/repo/migrate/migrating.tmpl b/templates/repo/migrate/migrating.tmpl index 8921d97277..b329fb3ecc 100644 --- a/templates/repo/migrate/migrating.tmpl +++ b/templates/repo/migrate/migrating.tmpl @@ -73,8 +73,8 @@
- - + +
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index ad46953ae5..80aec2b252 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -921,8 +921,8 @@
- - + +