diff options
author | Giteabot <teabot@gitea.io> | 2023-12-19 16:40:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-19 16:40:03 +0800 |
commit | 932e282e153ca30f6afaac738469137b761cf904 (patch) | |
tree | 1895cc47a065086812f550f666a97e1acfa2387a | |
parent | d9aeb1f09d3e8e734ccc51c50072a07f822e3033 (diff) | |
download | gitea-932e282e153ca30f6afaac738469137b761cf904.tar.gz gitea-932e282e153ca30f6afaac738469137b761cf904.zip |
Fix duplicate ID when deleting repo (#28520) (#28528)
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>
-rw-r--r-- | templates/repo/migrate/migrating.tmpl | 4 | ||||
-rw-r--r-- | 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 649d14ad99..48411e2da2 100644 --- a/templates/repo/migrate/migrating.tmpl +++ b/templates/repo/migrate/migrating.tmpl @@ -73,8 +73,8 @@ </label> </div> <div class="required field"> - <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" required> + <label for="repo_name_to_delete">{{ctx.Locale.Tr "repo.repo_name"}}</label> + <input id="repo_name_to_delete" name="repo_name" required> </div> <div class="text right actions"> diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 85ff82fda7..5a32f5e7ae 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -921,8 +921,8 @@ </label> </div> <div class="required field"> - <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label> - <input id="repo_name" name="repo_name" required> + <label for="repo_name_to_delete">{{ctx.Locale.Tr "repo.repo_name"}}</label> + <input id="repo_name_to_delete" name="repo_name" required> </div> <div class="text right actions"> |