Commit cab25d36 authored by Paul Slaughter's avatar Paul Slaughter

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

Make markdown textarea buttons tab accessible

See merge request gitlab-org/gitlab!34300
parents 55abaa52 c73c52e2
...@@ -89,14 +89,13 @@ export default { ...@@ -89,14 +89,13 @@ export default {
<div class="md-header"> <div class="md-header">
<ul class="nav-links clearfix"> <ul class="nav-links clearfix">
<li :class="{ active: !previewMarkdown }" class="md-header-tab"> <li :class="{ active: !previewMarkdown }" class="md-header-tab">
<button class="js-write-link" tabindex="-1" type="button" @click="writeMarkdownTab($event)"> <button class="js-write-link" type="button" @click="writeMarkdownTab($event)">
{{ __('Write') }} {{ __('Write') }}
</button> </button>
</li> </li>
<li :class="{ active: previewMarkdown }" class="md-header-tab"> <li :class="{ active: previewMarkdown }" class="md-header-tab">
<button <button
class="js-preview-link js-md-preview-button" class="js-preview-link js-md-preview-button"
tabindex="-1"
type="button" type="button"
@click="previewMarkdownTab($event)" @click="previewMarkdownTab($event)"
> >
......
...@@ -64,7 +64,6 @@ export default { ...@@ -64,7 +64,6 @@ export default {
:aria-label="buttonTitle" :aria-label="buttonTitle"
type="button" type="button"
class="toolbar-btn js-md" class="toolbar-btn js-md"
tabindex="-1"
data-container="body" data-container="body"
@click="() => $emit('click')" @click="() => $emit('click')"
> >
......
...@@ -244,7 +244,6 @@ module MarkupHelper ...@@ -244,7 +244,6 @@ module MarkupHelper
content_tag :button, content_tag :button,
type: 'button', type: 'button',
class: 'toolbar-btn js-md has-tooltip', class: 'toolbar-btn js-md has-tooltip',
tabindex: -1,
data: data, data: data,
title: options[:title], title: options[:title],
aria: { label: options[:title] } do aria: { label: options[:title] } do
......
The subject will be used as the title of the new issue, and the message will be the description. The subject will be used as the title of the new issue, and the message will be the description.
= link_to 'Quick actions', help_page_path('user/project/quick_actions'), target: '_blank', tabindex: -1 = link_to 'Quick actions', help_page_path('user/project/quick_actions'), target: '_blank'
and styling with and styling with
= link_to 'Markdown', help_page_path('user/markdown'), target: '_blank', tabindex: -1 = link_to 'Markdown', help_page_path('user/markdown'), target: '_blank'
are supported. are supported.
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
.md-header .md-header
%ul.nav.nav-tabs.nav-links.clearfix %ul.nav.nav-tabs.nav-links.clearfix
%li.md-header-tab.active %li.md-header-tab.active
%button.js-md-write-button{ tabindex: -1 } %button.js-md-write-button
= _("Write") = _("Write")
%li.md-header-tab %li.md-header-tab
%button.js-md-preview-button{ tabindex: -1 } %button.js-md-preview-button
= _("Preview") = _("Preview")
%li.md-header-toolbar.active %li.md-header-toolbar.active
......
%p.form-text.text-muted %p.form-text.text-muted
Add Add
= link_to 'description templates', help_page_path('user/project/description_templates'), tabindex: -1 = link_to 'description templates', help_page_path('user/project/description_templates')
to help your contributors communicate effectively! to help your contributors communicate effectively!
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- if issuable.respond_to?(:work_in_progress?) - if issuable.respond_to?(:work_in_progress?)
.form-text.text-muted .form-text.text-muted
.js-wip-explanation .js-wip-explanation
%a.js-toggle-wip{ href: '', tabindex: -1 } %a.js-toggle-wip{ href: '' }
Remove the Remove the
%code WIP: %code WIP:
prefix from the title prefix from the title
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
- if has_wip_commits - if has_wip_commits
It looks like you have some WIP commits in this branch. It looks like you have some WIP commits in this branch.
%br %br
%a.js-toggle-wip{ href: '', tabindex: -1 } %a.js-toggle-wip{ href: '' }
Start the title with Start the title with
%code WIP: %code WIP:
to prevent a to prevent a
......
- supports_quick_actions = local_assigns.fetch(:supports_quick_actions, false) - supports_quick_actions = local_assigns.fetch(:supports_quick_actions, false)
.comment-toolbar.clearfix .comment-toolbar.clearfix
.toolbar-text .toolbar-text
= link_to _('Markdown'), help_page_path('user/markdown'), target: '_blank', tabindex: -1 = link_to _('Markdown'), help_page_path('user/markdown'), target: '_blank'
- if supports_quick_actions - if supports_quick_actions
and and
= link_to _('quick actions'), help_page_path('user/project/quick_actions'), target: '_blank', tabindex: -1 = link_to _('quick actions'), help_page_path('user/project/quick_actions'), target: '_blank'
are are
- else - else
is is
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
or or
%button.attach-new-file.markdown-selector{ type: 'button' }= _("attach a new file") %button.attach-new-file.markdown-selector{ type: 'button' }= _("attach a new file")
%button.markdown-selector.button-attach-file.btn-link{ type: 'button', tabindex: '-1' } %button.markdown-selector.button-attach-file.btn-link{ type: 'button' }
= icon('file-image-o', class: 'toolbar-button-icon') = icon('file-image-o', class: 'toolbar-button-icon')
%span.text-attach-file<> %span.text-attach-file<>
= _("Attach a file") = _("Attach a file")
......
---
title: Make markdown textarea buttons tab accessible
merge_request: 34300
author:
type: fixed
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