aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/release/new.tmpl
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-04-10 17:56:57 +0200
committerGitHub <noreply@github.com>2023-04-10 11:56:57 -0400
commitd7552c27d38f5ad342fe1c17cedfb6e22ba4d5d8 (patch)
tree7122bbe1d50efba9bb623f8fae66782037147fc6 /templates/repo/release/new.tmpl
parentcb1536471bcef4d78a3fe5cbd738b9f60fabbcc2 (diff)
downloadgitea-d7552c27d38f5ad342fe1c17cedfb6e22ba4d5d8.tar.gz
gitea-d7552c27d38f5ad342fe1c17cedfb6e22ba4d5d8.zip
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
Diffstat (limited to 'templates/repo/release/new.tmpl')
-rw-r--r--templates/repo/release/new.tmpl13
1 files changed, 6 insertions, 7 deletions
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}}
<b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
{{else}}
- <input id="tag-name" name="tag_name" value="{{.tag_name}}" placeholder="{{.locale.Tr "repo.release.tag_name"}}" autofocus required maxlength="255">
+ <input id="tag-name" name="tag_name" value="{{.tag_name}}" aria-label="{{.locale.Tr "repo.release.tag_name"}}" placeholder="{{.locale.Tr "repo.release.tag_name"}}" autofocus required maxlength="255">
<input id="tag-name-editor" type="hidden" data-existing-tags={{Json .Tags}} data-tag-helper={{.locale.Tr "repo.release.tag_helper"}} data-tag-helper-new={{.locale.Tr "repo.release.tag_helper_new"}} data-tag-helper-existing={{.locale.Tr "repo.release.tag_helper_existing"}}>
<div id="tag-target-selector" class="gt-dib">
<span class="at">@</span>
@@ -39,25 +39,24 @@
</div>
</div>
<div>
- <span id="tag-helper" class="help gt-mt-2">{{.locale.Tr "repo.release.tag_helper"}}</span>
+ <span id="tag-helper" class="help gt-mt-3 gt-pb-0">{{.locale.Tr "repo.release.tag_helper"}}</span>
</div>
{{end}}
</div>
</div>
- <div class="eleven wide column">
+ <div class="eleven wide column gt-pt-0">
<div class="field {{if .Err_Title}}error{{end}}">
- <label>{{.locale.Tr "repo.release.title"}}</label>
- <input name="title" placeholder="{{.locale.Tr "repo.release.title"}}" value="{{.title}}" autofocus maxlength="255">
+ <input name="title" aria-label="{{.locale.Tr "repo.release.title"}}" placeholder="{{.locale.Tr "repo.release.title"}}" value="{{.title}}" autofocus maxlength="255">
</div>
<div class="field">
- <label>{{.locale.Tr "repo.release.content"}}</label>
-
{{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"
)}}
</div>