Commit 26e9be96 authored by Illya Klymov's avatar Illya Klymov

Merge branch 'cngo-make-markdown-textarea-links-tab-accessible' into 'master'

Make markdown textarea links tab-accessible

See merge request gitlab-org/gitlab!33518
parents 8b39ede9 4ca8e36e
<script> <script>
/* eslint-disable @gitlab/vue-require-i18n-strings */ import { GlButton, GlLink, GlLoadingIcon, GlSprintf } from '@gitlab/ui';
import { GlLink, GlLoadingIcon } from '@gitlab/ui';
export default { export default {
components: { components: {
GlButton,
GlLink, GlLink,
GlLoadingIcon, GlLoadingIcon,
GlSprintf,
}, },
props: { props: {
markdownDocsPath: { markdownDocsPath: {
...@@ -35,25 +36,32 @@ export default { ...@@ -35,25 +36,32 @@ export default {
<div class="comment-toolbar clearfix"> <div class="comment-toolbar clearfix">
<div class="toolbar-text"> <div class="toolbar-text">
<template v-if="!hasQuickActionsDocsPath && markdownDocsPath"> <template v-if="!hasQuickActionsDocsPath && markdownDocsPath">
<gl-link :href="markdownDocsPath" target="_blank" tabindex="-1">{{ <gl-link :href="markdownDocsPath" target="_blank">{{
__('Markdown is supported') __('Markdown is supported')
}}</gl-link> }}</gl-link>
</template> </template>
<template v-if="hasQuickActionsDocsPath && markdownDocsPath"> <template v-if="hasQuickActionsDocsPath && markdownDocsPath">
<gl-link :href="markdownDocsPath" target="_blank" tabindex="-1">{{ <gl-sprintf
__('Markdown') :message="
}}</gl-link> __(
and '%{markdownDocsLinkStart}Markdown%{markdownDocsLinkEnd} and %{quickActionsDocsLinkStart}quick actions%{quickActionsDocsLinkEnd} are supported',
<gl-link :href="quickActionsDocsPath" target="_blank" tabindex="-1">{{ )
__('quick actions') "
}}</gl-link> >
are supported <template #markdownDocsLink="{content}">
<gl-link :href="markdownDocsPath" target="_blank">{{ content }}</gl-link>
</template>
<template #quickActionsDocsLink="{content}">
<gl-link :href="quickActionsDocsPath" target="_blank">{{ content }}</gl-link>
</template>
</gl-sprintf>
</template> </template>
</div> </div>
<span v-if="canAttachFile" class="uploading-container"> <span v-if="canAttachFile" class="uploading-container">
<span class="uploading-progress-container hide"> <span class="uploading-progress-container hide">
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i> <i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i>
<span class="attaching-file-message"></span> <span class="attaching-file-message"></span>
<!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings -->
<span class="uploading-progress">0%</span> <span class="uploading-progress">0%</span>
<gl-loading-icon inline class="align-text-bottom" /> <gl-loading-icon inline class="align-text-bottom" />
</span> </span>
...@@ -62,18 +70,29 @@ export default { ...@@ -62,18 +70,29 @@ export default {
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i> <i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i>
</span> </span>
<span class="uploading-error-message"></span> <span class="uploading-error-message"></span>
<button class="retry-uploading-link" type="button">{{ __('Try again') }}</button> or
<button class="attach-new-file markdown-selector" type="button"> <gl-sprintf
{{ __('attach a new file') }} :message="
</button> __(
'%{retryButtonStart}Try again%{retryButtonEnd} or %{newFileButtonStart}attach a new file%{newFileButtonEnd}',
)
"
>
<template #retryButton="{content}">
<button class="retry-uploading-link" type="button">{{ content }}</button>
</template>
<template #newFileButton="{content}">
<button class="attach-new-file markdown-selector" type="button">{{ content }}</button>
</template>
</gl-sprintf>
</span> </span>
<button class="markdown-selector button-attach-file btn-link" tabindex="-1" type="button"> <gl-button class="markdown-selector button-attach-file" variant="link">
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i <i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i
><span class="text-attach-file">{{ __('Attach a file') }}</span> ><span class="text-attach-file">{{ __('Attach a file') }}</span>
</button> </gl-button>
<button class="btn btn-default btn-sm hide button-cancel-uploading-files" type="button"> <gl-button class="btn btn-default btn-sm hide button-cancel-uploading-files" variant="link">
{{ __('Cancel') }} {{ __('Cancel') }}
</button> </gl-button>
</span> </span>
</div> </div>
</template> </template>
---
title: Make markdown textarea links tab-accessible
merge_request: 33518
author:
type: fixed
...@@ -430,6 +430,9 @@ msgstr "" ...@@ -430,6 +430,9 @@ msgstr ""
msgid "%{lock_path} is locked by GitLab User %{lock_user_id}" msgid "%{lock_path} is locked by GitLab User %{lock_user_id}"
msgstr "" msgstr ""
msgid "%{markdownDocsLinkStart}Markdown%{markdownDocsLinkEnd} and %{quickActionsDocsLinkStart}quick actions%{quickActionsDocsLinkEnd} are supported"
msgstr ""
msgid "%{mergeLength}/%{usersLength} can merge" msgid "%{mergeLength}/%{usersLength} can merge"
msgstr "" msgstr ""
...@@ -503,6 +506,9 @@ msgid_plural "%{releases} releases" ...@@ -503,6 +506,9 @@ msgid_plural "%{releases} releases"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "%{retryButtonStart}Try again%{retryButtonEnd} or %{newFileButtonStart}attach a new file%{newFileButtonEnd}"
msgstr ""
msgid "%{screenreaderOnlyStart}Keyboard shorcuts%{screenreaderOnlyEnd} Disabled" msgid "%{screenreaderOnlyStart}Keyboard shorcuts%{screenreaderOnlyEnd} Disabled"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment