diff options
author | silverwind <me@silverwind.io> | 2023-04-10 17:56:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-10 11:56:57 -0400 |
commit | d7552c27d38f5ad342fe1c17cedfb6e22ba4d5d8 (patch) | |
tree | 7122bbe1d50efba9bb623f8fae66782037147fc6 /templates/repo/wiki | |
parent | cb1536471bcef4d78a3fe5cbd738b9f60fabbcc2 (diff) | |
download | gitea-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/wiki')
-rw-r--r-- | templates/repo/wiki/new.tmpl | 8 |
1 files changed, 5 insertions, 3 deletions
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 @@ <form class="ui form" action="{{.Link}}?action={{if .PageIsWikiEdit}}_edit{{else}}_new{{end}}" method="post"> {{.CsrfTokenHtml}} <div class="field {{if .Err_Title}}error{{end}}"> - <input name="title" value="{{.title}}" autofocus required> + <input name="title" value="{{.title}}" aria-label="{{.locale.Tr "repo.wiki.page_title"}}" placeholder="{{.locale.Tr "repo.wiki.page_title"}}" autofocus required> </div> <div class="help"> {{.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 )}} - <div class="field"> - <input name="message" placeholder="{{.locale.Tr "repo.wiki.default_commit_message"}}"> + <div class="field gt-mt-4"> + <input name="message" aria-label="{{.locale.Tr "repo.wiki.default_commit_message"}}" placeholder="{{.locale.Tr "repo.wiki.default_commit_message"}}"> </div> <div class="text right"> <button class="ui green button"> |