aboutsummaryrefslogtreecommitdiffstats
path: root/templates/shared
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/shared
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/shared')
-rw-r--r--templates/shared/combomarkdowneditor.tmpl17
1 files changed, 11 insertions, 6 deletions
diff --git a/templates/shared/combomarkdowneditor.tmpl b/templates/shared/combomarkdowneditor.tmpl
index 887673e40e..38c7a48a3a 100644
--- a/templates/shared/combomarkdowneditor.tmpl
+++ b/templates/shared/combomarkdowneditor.tmpl
@@ -1,10 +1,15 @@
{{/*
Template Attributes:
-* locale
-* ContainerId / ContainerClasses : for the container element
-* MarkdownPreviewUrl / MarkdownPreviewContext: for the preview tab
-* TextareaName / TextareaContent / TextareaPlaceholder: for the main textarea
-* DropzoneParentContainer: for file upload (leave it empty if no upload)
+* locale: passed through for localization
+* ContainerId: id attribute for the container element
+* ContainerClasses: additional classes for the container element
+* MarkdownPreviewUrl: preview url for the preview tab
+* MarkdownPreviewContext: preview context for the preview tab
+* TextareaName: name attribute for the textarea
+* TextareaContent: content for the textarea
+* TextareaPlaceholder: placeholder attribute for the textarea
+* TextareaAriaLabel: aria-label attribute for the textarea
+* DropzoneParentContainer: container for file upload (leave it empty if no upload)
*/}}
<div {{if .ContainerId}}id="{{.ContainerId}}"{{end}} class="combo-markdown-editor {{.ContainerClasses}}" data-dropzone-parent-container="{{.DropzoneParentContainer}}">
{{if .MarkdownPreviewUrl}}
@@ -40,7 +45,7 @@ Template Attributes:
</div>
</markdown-toolbar>
<text-expander keys=": @">
- <textarea class="markdown-text-editor js-quick-submit" name="{{.TextareaName}}" placeholder="{{.TextareaPlaceholder}}">{{.TextareaContent}}</textarea>
+ <textarea class="markdown-text-editor js-quick-submit"{{if .TextareaName}} name="{{.TextareaName}}"{{end}}{{if .TextareaPlaceholder}} placeholder="{{.TextareaPlaceholder}}"{{end}}{{if .TextareaAriaLabel}} aria-label="{{.TextareaAriaLabel}}"{{end}}>{{.TextareaContent}}</textarea>
</text-expander>
</div>
<div class="ui tab markup" data-tab-panel="markdown-previewer">