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/shared | |
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/shared')
-rw-r--r-- | templates/shared/combomarkdowneditor.tmpl | 17 |
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"> |