From: Kohei Yoshino Date: Thu, 2 Apr 2020 22:07:40 +0000 (-0400) Subject: Bug 1626543 - Some fields on enter bug page do not have associated labels X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4556bf6964cd9f5de4ef387f9f4f696669af97b;p=thirdparty%2Fbugzilla.git Bug 1626543 - Some fields on enter bug page do not have associated labels --- diff --git a/extensions/BMO/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl b/extensions/BMO/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl index aaf934fdb..190ea9419 100644 --- a/extensions/BMO/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl +++ b/extensions/BMO/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl @@ -16,7 +16,7 @@ None - @@ -27,5 +27,3 @@ [% END %] - - diff --git a/extensions/BMO/template/en/default/hook/bug/create/create-end.html.tmpl b/extensions/BMO/template/en/default/hook/bug/create/create-end.html.tmpl index 8ca7548a0..8559c416f 100644 --- a/extensions/BMO/template/en/default/hook/bug/create/create-end.html.tmpl +++ b/extensions/BMO/template/en/default/hook/bug/create/create-end.html.tmpl @@ -11,7 +11,7 @@
- +
Mozilla employees
diff --git a/extensions/Needinfo/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl b/extensions/Needinfo/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl index 09f12086a..9406570d7 100644 --- a/extensions/Needinfo/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl +++ b/extensions/Needinfo/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl @@ -7,7 +7,7 @@ #%] - Request information from: + : [% INCLUDE global/userselect.html.tmpl diff --git a/extensions/Review/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl b/extensions/Review/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl index 2ef267a9c..018c6d0b9 100644 --- a/extensions/Review/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl +++ b/extensions/Review/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl @@ -7,7 +7,7 @@ #%] - Mentors: + : [% INCLUDE global/userselect.html.tmpl id = "bug_mentors" diff --git a/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl b/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl index 658ec3ee6..86e6fe22a 100644 --- a/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl +++ b/extensions/UserStory/template/en/default/hook/bug/create/create-after_custom_fields.html.tmpl @@ -12,12 +12,12 @@ - +
-
diff --git a/js/attachment.js b/js/attachment.js index de2f89089..89d8d9dca 100644 --- a/js/attachment.js +++ b/js/attachment.js @@ -452,7 +452,6 @@ Bugzilla.AttachmentForm = class AttachmentForm { this.$description.value = file.name; } - this.$textarea.hidden = true; this.$description.select(); this.$description.focus(); } @@ -473,8 +472,8 @@ Bugzilla.AttachmentForm = class AttachmentForm { const message_short = invalid ? 'File too large' : ''; this.$error_message.innerHTML = message; - this.$data.setCustomValidity(message_short); - this.$data.setAttribute('aria-invalid', invalid); + this.$textarea.setCustomValidity(message_short); + this.$textarea.setAttribute('aria-invalid', invalid); this.$dropbox.classList.toggle('invalid', invalid); return !invalid; diff --git a/skins/standard/attachment.css b/skins/standard/attachment.css index d42aeeb1b..6951a3f56 100644 --- a/skins/standard/attachment.css +++ b/skins/standard/attachment.css @@ -407,10 +407,6 @@ textarea#viewFrame { resize: none; } -#att-data:invalid { - display: block; /* To display the validation message */ -} - #att-textarea { margin: 0; border: 0; diff --git a/template/en/default/attachment/createformcontents.html.tmpl b/template/en/default/attachment/createformcontents.html.tmpl index b1c1f4ac5..e48f5d315 100644 --- a/template/en/default/attachment/createformcontents.html.tmpl +++ b/template/en/default/attachment/createformcontents.html.tmpl @@ -37,10 +37,10 @@
- + + aria-label="Attachment Content" aria-invalid="false" aria-errormessage="att-error-message" + aria-description="Paste text, link or image to be added as an attachment"> diff --git a/template/en/default/bug/comment.html.tmpl b/template/en/default/bug/comment.html.tmpl index db3868d84..d10d004cd 100644 --- a/template/en/default/bug/comment.html.tmpl +++ b/template/en/default/bug/comment.html.tmpl @@ -13,7 +13,7 @@ #%] @@ -48,7 +48,7 @@ [% IF Param('use_markdown') %] [% END %] diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 3bb351ef2..8815dec47 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -236,7 +236,7 @@ TUI_hide_default('expert_fields'); - +
@@ -281,6 +281,7 @@ TUI_hide_default('expert_fields'); %] [%# Enclose the fieldset in a nested table so that its width changes based # on the length on the component description. %] - +
@@ -470,6 +476,7 @@ TUI_hide_default('expert_fields'); field = bug_fields.cc editable = 1 %] [% END %] @@ -513,6 +522,7 @@ TUI_hide_default('expert_fields'); @@ -554,7 +564,7 @@ TUI_hide_default('expert_fields'); [% END %] - + @@ -601,7 +612,7 @@ TUI_hide_default('expert_fields'); class="bz_default_hidden" onClick="handleWantsAttachment(false)">
Add an attachment -
@@ -338,7 +339,8 @@ TUI_hide_default('expert_fields'); field = bug_fields.version editable = 1 rowspan = 3 %]
- [%- FOREACH v = version %] [% NEXT IF NOT v.is_active %] + [% assigned_to_desc = help_html.assigned_to FILTER txt FILTER collapse %] [% INCLUDE global/userselect.html.tmpl id => "assigned_to" name => "assigned_to" @@ -435,11 +438,12 @@ TUI_hide_default('expert_fields'); size => 30 emptyok => 1 custom_userlist => assignees_list + aria_description => assigned_to_desc %] [% UNLESS assigned_to_disabled %] [% END %] @@ -451,6 +455,7 @@ TUI_hide_default('expert_fields'); field = bug_fields.qa_contact editable = 1 %] + [% qa_contact_desc = help_html.qa_contact FILTER txt FILTER collapse %] [% INCLUDE global/userselect.html.tmpl id => "qa_contact" name => "qa_contact" @@ -459,6 +464,7 @@ TUI_hide_default('expert_fields'); size => 30 emptyok => 1 custom_userlist => qa_contacts_list + aria_description => qa_contact_desc %] + [% cc_desc = help_html.cc FILTER txt FILTER collapse %] [% INCLUDE global/userselect.html.tmpl id => "cc" name => "cc" @@ -477,6 +484,7 @@ TUI_hide_default('expert_fields'); disabled => cc_disabled size => 30 multiple => 5 + aria_description => cc_desc %] @@ -499,7 +507,8 @@ TUI_hide_default('expert_fields'); field = bug_fields.alias editable = 1 %] - +
Description:: [% defaultcontent = BLOCK %] @@ -584,6 +594,7 @@ TUI_hide_default('expert_fields'); %]
+
[% PROCESS attachment/createformcontents.html.tmpl flag_types = product.flag_types.attachment any_flags_requesteeble = 1 @@ -630,13 +641,15 @@ TUI_hide_default('expert_fields'); field = bug_fields.dependson editable = 1 %] [% INCLUDE "bug/field-label.html.tmpl" field = bug_fields.blocked editable = 1 %] @@ -647,7 +660,8 @@ TUI_hide_default('expert_fields'); editable = 1 %] - +
- + - +
- + [%~# Regressions field is hidden from new bugs ~%] @@ -666,7 +680,7 @@ TUI_hide_default('expert_fields'); [% END %]
Whiteboard:: @@ -828,10 +842,10 @@ TUI_hide_default('expert_fields'); [% Hook.process("end") %] @@ -847,8 +861,8 @@ TUI_hide_default('expert_fields'); field = field editable = 1 %] - [%- FOREACH x = ${field.name} %] [% NEXT IF NOT x.is_active %] for the field. # bug (optional): The current Bugzilla::Bug being displayed, or a hash # with default field values being displayed on a page. + # aria_label (optional): Accessible label for the form widget. #%] [% SET hidden = 0 %] @@ -46,6 +47,11 @@ [% SET hidden = 1 %] [% END %] +[% SET aria_description = '' %] +[% IF help_html.${field.name}.defined %] + [% SET aria_description = help_html.${field.name} FILTER txt FILTER collapse %] +[% END %] + [% IF NOT no_tds %] [% PROCESS "bug/field-label.html.tmpl" %] [% CASE [constants.FIELD_TYPE_DATETIME, constants.FIELD_TYPE_DATE] %] @@ -68,6 +76,8 @@