summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/template/en
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-02-22 15:26:21 +0100
committerDylan William Hardison <dylan@hardison.net>2017-02-22 15:26:21 +0100
commitaa3c437901f04eacc157330d4f868fdf3339722e (patch)
tree17eac737f5d855001e87582bea480d90529359e0 /extensions/BugModal/template/en
parent318b9027db03bc7397fa8072811db33783d29976 (diff)
downloadbugzilla-aa3c437901f04eacc157330d4f868fdf3339722e.tar.gz
bugzilla-aa3c437901f04eacc157330d4f868fdf3339722e.tar.xz
Revert "Bug 1280363 - [a11y] Make the Actions menu button accessible for keyboard and screen readers"
Diffstat (limited to 'extensions/BugModal/template/en')
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl48
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl95
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/header.html.tmpl6
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/user.html.tmpl7
4 files changed, 35 insertions, 121 deletions
diff --git a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
index 49817b6a1..c658f0642 100644
--- a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl
@@ -14,43 +14,21 @@
[% END %]
<button type="button" id="comment-tags-btn" style="display:none" class="minor">Tags &#9662;</button>
<button type="button" id="view-menu-btn" class="minor">View &#9662;</button>
- <div class="dropdown">
- <button type="button" role="button" id="comment-tags-btn" arai-haspopup="true" aria-label="Tags Menu"
- aria-expanded="false" aria-controls="comment-tags-menu" class="dropdown-button minor">Tags &#9662;</button>
- <ul id="comment-tags-menu" role="menu" tabindex="0" class="dropdown-content" style="display:none">
- <li class="dropdown-separator" role="presentation">
- <a role="menuitem" tabindex="-1" data-comment-tag="">Reset</a>
- </li>
- </ul>
- </div>
- <div class="dropdown">
- <button type="button" role="button" id="view-menu-btn" arai-haspopup="true" aria-label="View Menu"
- aria-expanded="false" aria-controls="view-menu" class="dropdown-button minor">View &#9662;</button>
- <ul id="view-menu" role="menu" tabindex="0" class="dropdown-content" style="display:none">
- <li class="dropdown-separator" role="presentation">
- <a id="view-reset" role="menuitem" tabindex="-1">Reset</a>
- </li>
- <li role="presentation">
- <a id="view-collapse-all" role="menuitem" tabindex="-1">Collapse All</a>
- </li>
- <li role="presentation">
- <a id="view-expand-all" role="menuitem" tabindex="-1">Expand All</a>
- </li>
- <li class="dropdown-separator" role="presentation">
- <a id="view-comments-only" role="menuitem" tabindex="-1">Comments Only</a>
- </li>
- <li role="presentation">
- <a id="view-toggle-cc" role="menuitem" tabindex="-1">Show CC Changes</a>
- </li>
- [% IF treeherder %]
- <li role="presentation">
- <a id="view-toggle-treeherder" role="menuitem" data-userid="[% treeherder.id FILTER none %]">Hide Treeherder Comments</a>
- </li>
- [% END %]
- </ul>
- </div>
</div>
+<menu id="view-menu" type="context" style="display:none">
+ <menuitem id="view-reset" label="Reset"></menuitem>
+ <hr>
+ <menuitem id="view-collapse-all" label="Collapse All"></menuitem>
+ <menuitem id="view-expand-all" label="Expand All"></menuitem>
+ <menuitem id="view-comments-only" label="Comments Only"></menuitem>
+ <hr>
+ <menuitem id="view-toggle-cc" label="Show CC Changes"></menuitem>
+ [% IF treeherder %]
+ <menuitem id="view-toggle-treeherder" label="Hide Treeherder Comments" data-userid="[% treeherder.id FILTER none %]"></menuitem>
+ [% END %]
+</menu>
+
[%
PROCESS bug/time.html.tmpl;
diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
index 6373e1f52..4b23df786 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -308,32 +308,19 @@
[% is_cced ? "Stop Following" : "Follow" %]
</button>
[% END %]
- <div class="dropdown">
- <button id="action-menu-btn" aria-haspopup="true" aria-label="Actions Menu"
- aria-expanded="false" aria-controls="action-menu" class="dropdown-button minor">&#9662;</button>
- <ul class="dropdown-content" id="action-menu" role="menu" style="display:none;">
- <li role="presentation">
- <a id="action-reset" role="menuitem" tabindex="-1">Reset Sections</a>
- </li>
- <li role="presentation">
- <a id="action-expand-all" role="menuitem" tabindex="-1">Expand All Sections</a>
- </li>
- <li class="dropdown-separator" role="presentation">
- <a id="action-collapse-all" role="menuitem" tabindex="-1">Collapse All Sections</a>
- </li>
- [% IF user.id %]
- <li role="presentation">
- <a id="action-add-comment" role="menuitem" tabindex="-1">Add Comment</a>
- </li>
- [% END %]
- <li class="dropdown-separator" role="presentation">
- <a id="action-last-comment" role="menuitem" tabindex="-1">Last Comment</a>
- </li>
- <li role="presentation">
- <a id="action-history" role="menuitem" tabindex="-1">History</a>
- </li>
- </ul>
- </div>
+ <button type="button" id="action-menu-btn" class="minor">&#9662;</button>
+ <menu id="action-menu" type="context" style="display:none">
+ <menuitem id="action-reset" label="Reset Sections"></menuitem>
+ <menuitem id="action-expand-all" label="Expand All Sections"></menuitem>
+ <menuitem id="action-collapse-all" label="Collapse All Sections"></menuitem>
+ <hr>
+ [% IF user.id %]
+ <menuitem id="action-add-comment" label="Add Comment"></menuitem>
+ [% END %]
+ <menuitem id="action-last-comment" label="Last Comment"></menuitem>
+ <hr>
+ <menuitem id="action-history" label="History"></menuitem>
+ </menu>
</div>
<div id="user-guide">
<a title="User guide for [% terms.Bugzilla %]" href="https://wiki.mozilla.org/BMO/UserGuide">Get help with this page</a>
@@ -1313,61 +1300,9 @@
<div id="bottom-actions">
<div id="bottom-right-actions">
<button type="button" id="top-btn" class="minor">Top &uarr;</button>
- <div class="dropdown">
- <button id="format-btn" aria-haspopup="true" aria-label="Format [% terms.Bug %] Menu"
- aria-expanded="false" aria-controls="format-menu" class="dropdown-button minor">Format [% terms.Bug %] &#9652;</button>
- <ul class="dropdown-content menu-up" id="format-menu" role="menu" style="display:none;">
- <li role="presentation">
- <a href="show_bug.cgi?format=multiple&amp;id=[% bug.id FILTER uri %]" role="menuitem" tabindex="-1">For Printing</a>
- </li>
- <li role="presentation">
- <a href="show_bug.cgi?ctype=xml&amp;id=[% bug.id FILTER uri %]" role="menuitem" tabindex="-1">XML</a>
- </li>
- <li role="presentation">
- <a href="show_bug.cgi?format=default&amp;id=[% bug.id FILTER uri %]" role="menuitem" tabindex="-1">Legacy</a>
- </li>
- [% IF bug.groups_in.size == 0 %]
- <li role="presentation">
- <a href="rest/bug/[% bug.id FILTER uri %]" role="menuitem" tabindex="-1">JSON</a>
- </li>
- [% END %]
- </ul>
- </div>
+ <button type="button" id="format-btn" class="minor">Format &#9662;</button>
[% IF user.id %]
- <div class="dropdown">
- <button id="new-bug-btn" aria-haspopup="true" aria-label="New/Clone [% terms.Bug %] Menu"
- aria-expanded="false" aria-controls="new-bug-menu" class="dropdown-button minor">New/Clone [% terms.Bug %] &#9652;</button>
- <ul class="dropdown-content menu-up" id="new-bug-menu" role="menu" style="display:none;">
- <li role="presentation">
- <a href="enter_bug.cgi" role="menuitem" tabindex="-1" target="_blank">
- Create a new [% terms.bug %]</a>
- </li>
- <li role="presentation">
- <a href="enter_bug.cgi?product=[% bug.product FILTER uri %]"
- role="menuitem" tabindex="-1" target="_blank">&#8230; in this product</a>
- </li>
- <li class="dropdown-separator" role="presentation">
- <a href="enter_bug.cgi?product=[% bug.product FILTER uri %]&amp;component=[% bug.component FILTER uri %]"
- role="menuitem" tabindex="-1" target="_blank">&#8230; in this component</a>
- </li>
- <li role="presentation">
- <a href="enter_bug.cgi?format=__default__&amp;product=[% bug.product FILTER uri %]&amp;blocked=[% bug.id FILTER uri %]"
- role="menuitem" tabindex="-1" target="_blank">&#8230; that blocks this [% terms.bug %]</a>
- </li>
- <li class="dropdown-separator" role="presentation">
- <a href="enter_bug.cgi?format=__default__&amp;product=[% bug.product FILTER uri %]&amp;dependson=[% bug.id FILTER uri %]"
- role="menuitem" tabindex="-1" target="_blank">&#8230; that depends on this [% terms.bug %]</a>
- </li>
- <li role="presentation">
- <a href="enter_bug.cgi?format=__default__&amp;product=[% bug.product FILTER uri %]&amp;cloned_bug_id=[% bug.id FILTER uri %]"
- role="menuitem" tabindex="-1" target="_blank">&#8230; as a clone of this [% terms.bug %]</a>
- </li>
- <li role="presentation">
- <a href="enter_bug.cgi?format=__default__&amp;cloned_bug_id=[% terms.bug FILTER uri %]"
- role="menuitem" tabindex="-1" target="_blank">&#8230; as a clone, in a different product</a>
- </li>
- </ul>
- </div>
+ <button type="button" id="new-bug-btn" class="minor">New/Clone [% terms.Bug %] &#9662;</button>
[% END %]
</div>
</div>
diff --git a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
index 3231ab311..e5070bcf5 100644
--- a/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/header.html.tmpl
@@ -52,7 +52,6 @@
"extensions/ProdCompSearch/web/js/prod_comp_search.js",
"extensions/BugModal/web/bug_modal.js",
"extensions/BugModal/web/comments.js",
- "extensions/BugModal/web/dropdown.js",
"extensions/BugModal/web/ZeroClipboard/ZeroClipboard.min.js",
"js/bugzilla-readable-status-min.js",
"js/field.js",
@@ -61,13 +60,14 @@
);
jquery.push(
"datetimepicker",
+ "contextMenu",
"visibility"
);
style_urls.push(
"extensions/BugModal/web/bug_modal.css",
- "extensions/BugModal/web/dropdown.css",
"skins/custom/bug_groups.css",
- "js/jquery/plugins/datetimepicker/datetimepicker.css"
+ "js/jquery/plugins/datetimepicker/datetimepicker.css",
+ "js/jquery/plugins/contextMenu/contextMenu.css"
);
IF user.in_group('canconfirm');
diff --git a/extensions/BugModal/template/en/default/bug_modal/user.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/user.html.tmpl
index 4c28936cc..5c630ba07 100644
--- a/extensions/BugModal/template/en/default/bug_modal/user.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/user.html.tmpl
@@ -41,11 +41,12 @@ END;
width="[% gravatar_size FILTER none %]" height="[% gravatar_size FILTER none %]">
[% END %]
[% UNLESS gravatar_only %]
- <a class="email [%= "disabled" UNLESS u.is_enabled %]"
+ <a class="email [%= "disabled" UNLESS u.is_enabled %] [%= "show_usermenu" IF user.id %]"
[% IF user.id %]
href="mailto:[% u.email FILTER html %]"
- onclick="return show_usermenu([% u.id FILTER none %], '[% u.email FILTER js %]',
- [% user.in_group('editusers') || user.bless_groups.size > 0 ? "true" : "false" %])"
+ data-user-id="[% u.id FILTER html %]"
+ data-user-email="[% u.email FILTER html %]"
+ data-show-edit="[% user.in_group('editusers') || user.bless_groups.size > 9 ? 'true' : 'false' %]"
title="[% u.identity FILTER html %]"
[% ELSE %]
href="user_profile?user_id=[% u.id FILTER none %]"