From d7552c27d38f5ad342fe1c17cedfb6e22ba4d5d8 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 10 Apr 2023 17:56:57 +0200 Subject: [PATCH] Add placeholder and aria attributes to release and wiki edit page (#24031) - Add placeholders and aria-label all input fields on these two pages - Add margin before wiki change message - Remove labels from release page, replacing them with aria-label --- options/locale/locale_en-US.ini | 6 ++++-- templates/repo/release/new.tmpl | 13 ++++++------- templates/repo/wiki/new.tmpl | 8 +++++--- templates/shared/combomarkdowneditor.tmpl | 17 +++++++++++------ 4 files changed, 26 insertions(+), 18 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index eb1ffebc37..7e9675ee73 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1746,6 +1746,8 @@ wiki.create_first_page = Create the First Page wiki.page = Page wiki.filter_page = Filter page wiki.new_page = Page +wiki.page_title = Page title +wiki.page_content = Page content wiki.default_commit_message = Write a note about this page update (optional). wiki.save_page = Save Page wiki.last_commit_info = %s edited this page %s @@ -2311,9 +2313,9 @@ release.target = Target release.tag_helper = Choose an existing tag or create a new tag. release.tag_helper_new = New tag. This tag will be created from the target. release.tag_helper_existing = Existing tag. -release.title = Title +release.title = Release title release.title_empty = Title cannot be empty. -release.content = Content +release.message = Describe this release release.prerelease_desc = Mark as Pre-Release release.prerelease_helper = Mark this release unsuitable for production use. release.cancel = Cancel diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl index cd702d6aa6..7a4e28cffa 100644 --- a/templates/repo/release/new.tmpl +++ b/templates/repo/release/new.tmpl @@ -19,7 +19,7 @@ {{if .PageIsEditRelease}} {{.tag_name}}@{{.tag_target}} {{else}} - +
@ @@ -39,25 +39,24 @@
- {{.locale.Tr "repo.release.tag_helper"}} + {{.locale.Tr "repo.release.tag_helper"}}
{{end}} -
+
- - +
- - {{template "shared/combomarkdowneditor" (dict "locale" $.locale "MarkdownPreviewUrl" (print .Repository.Link "/markup") "MarkdownPreviewContext" .RepoLink "TextareaName" "content" "TextareaContent" .content + "TextareaPlaceholder" (.locale.Tr "repo.release.message") + "TextareaAriaLabel" (.locale.Tr "repo.release.message") "DropzoneParentContainer" "form" )}}
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index 57ab753e20..0765cb2c35 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -14,7 +14,7 @@
{{.CsrfTokenHtml}}
- +
{{.locale.Tr "repo.wiki.page_name_desc"}} @@ -29,11 +29,13 @@ "MarkdownPreviewUrl" (print .Repository.Link "/markup") "MarkdownPreviewContext" .RepoLink "TextareaName" "content" + "TextareaPlaceholder" (.locale.Tr "repo.wiki.page_content") + "TextareaAriaLabel" (.locale.Tr "repo.wiki.page_content") "TextareaContent" $content )}} -
- +
+