container = 1
hide_on_view = bug.priority == "--" && bug.bug_severity == "normal"
help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#priority"
- label_for = "priority"
%]
[% INCLUDE bug_modal/field.html.tmpl
field = bug_fields.priority
field_type = constants.FIELD_TYPE_SINGLE_SELECT
+ aria_label = bug_fields.priority.description
no_indent = 1
inline = 1
%]
[% INCLUDE bug_modal/field.html.tmpl
field = bug_fields.bug_severity
field_type = constants.FIELD_TYPE_SINGLE_SELECT
+ aria_label = bug_fields.bug_severity.description
inline = 1
%]
[% UNLESS cf_hidden_in_product('cf_rank', bug.product, bug.component, bug) %]
label = "Status"
hide_on_edit = 1
help = "https://wiki.mozilla.org/BMO/UserGuide/BugStatuses"
- label_for = "bug_status"
%]
[% bug.bug_status FILTER html %]
[%+ bug.resolution FILTER html IF bug.resolution %]
prefix = prefix
field = bug_fields.bug_status
field_type = constants.FIELD_TYPE_SINGLE_SELECT
+ aria_label = bug_fields.bug_status.description
editable = bug.choices.bug_status.size > 1
values = bug.choices.bug_status
inline = 1
prefix = prefix
field = bug_fields.resolution
field_type = constants.FIELD_TYPE_SINGLE_SELECT
+ aria_label = bug_fields.resolution.description
editable = bug.choices.resolution.size > (bug.resolution == "" ? 0 : 1)
values = bug.choices.resolution
inline = 1
hide_on_view = (bug.rep_platform == 'All' && bug.op_sys == 'All')
|| (bug.rep_platform == 'Unspecified' && bug.op_sys == 'Unspecified')
help = "https://wiki.mozilla.org/BMO/UserGuide/BugFields#rep_platform"
- label_for = "rep_platform"
%]
[% INCLUDE bug_modal/field.html.tmpl
field = bug_fields.rep_platform
field_type = constants.FIELD_TYPE_SINGLE_SELECT
+ aria_label = bug_fields.rep_platform.description
inline = 1
no_indent = 1
%]
[% INCLUDE bug_modal/field.html.tmpl
field = bug_fields.op_sys
field_type = constants.FIELD_TYPE_SINGLE_SELECT
+ aria_label = bug_fields.op_sys.description
inline = 1
%]
[% WRAPPER bug_modal/field.html.tmpl
# field_type: (const) constants.FIELD_TYPE_*
# no_label: (boolean) don't output label
# label: (string) field label text (default: field_descs.${$field.name}
+ # aria_label: (string) invisible aria-label attribute
# view_only: (boolean) don't allow editing (default: determined from bug.check_can_change_field)
# edit_only: (boolean) always render the edit ui
# container: (boolean) output just a label and the content (eg. for multiple fields next to one label)
# class: (string) optional button class
# caption: (string) button caption
# hidden: (boolean) don't show the button (default: false)
- # label_for: (string) optional label for identifier
#%]
[%
[% aria_labelledby_id = "${name}-help-link" %]
[% aria_labelledby_html = BLOCK %]aria-labelledby="[% aria_labelledby_id FILTER html %]"[% END %]
[% END %]
- [%~ IF label_for %]
- <label for="[% label_for FILTER html %]">
- [% END %]
[%~ label _ ":" FILTER html IF label %]
- [%~ IF label_for %]
- </label>
- [% END ~%]
[%~ IF help.defined %]
</a>
[% END %]
</div>
[% END %]
+ [% IF aria_label.defined %]
+ [% aria_labelledby_html = BLOCK %]aria-label="[% aria_label FILTER html %]"[% END %]
+ [% END %]
+
[%# read-only html %]
[% UNLESS edit_only %]
<div class="[% "value" IF !container %][% " edit-hide" IF editable %][% " container" IF container %]">