Skip to content

Commit

Permalink
Merge branch 'MDL-80805-main' of https://github.com/sammarshallou/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Feb 23, 2024
2 parents e567c21 + 14b1e93 commit f6a22d3
Show file tree
Hide file tree
Showing 25 changed files with 70 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/amd/build/form-autocomplete.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/amd/build/form-autocomplete.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/amd/src/form-autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,7 @@ define([
selectionId: 'form_autocomplete_selection-' + uniqueId,
downArrowId: 'form_autocomplete_downarrow-' + uniqueId,
items: [],
required: originalSelect[0]?.ariaRequired === 'true',
};

// Increment the unique counter so we don't get duplicates ever.
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-advcheckbox-inline.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{#element.frozen}}
disabled
{{/element.frozen}}
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-advcheckbox.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
aria-describedby="{{element.id}}_description"
{{/text}}
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{#element.frozen}}
disabled
{{/element.frozen}}
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-autocomplete-inline.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{#element.options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}{{#html}} data-html="{{html}}"{{/html}}>{{{text}}}</option>
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-autocomplete.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{#element.options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}{{#html}} data-html="{{html}}"{{/html}}>{{{text}}}</option>
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-checkbox-inline.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{#element.frozen}}
disabled
{{/element.frozen}}
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-checkbox.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
aria-describedby="{{element.id}}_description"
{{/text}}
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{#element.frozen}}
disabled
{{/element.frozen}}
Expand Down
6 changes: 5 additions & 1 deletion lib/form/templates/element-password-inline.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
{{#element.size}}size="{{element.size}}"{{/element.size}}
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}} {{{element.attributes}}}>
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}}>
{{/element.frozen}}
{{/element}}
{{/ core_form/element-template-inline }}
6 changes: 5 additions & 1 deletion lib/form/templates/element-password.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
{{#element.size}}size="{{element.size}}"{{/element.size}}
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}} {{{element.attributes}}}>
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}}>
{{/element.frozen}}
{{/element}}
{{/ core_form/element-template }}
3 changes: 3 additions & 0 deletions lib/form/templates/element-passwordunmask.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
{{# error }}
autofocus aria-describedby="{{ element.iderror }}"
{{/ error }}
{{#required}}
aria-required="true"
{{/required}}
{{{ element.attributes }}}
>
</span>
Expand Down
3 changes: 2 additions & 1 deletion lib/form/templates/element-radio.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
{{#element.frozen}}disabled{{/element.frozen}}
{{#error}}{{#element.checked}}
autofocus aria-describedby="{{element.iderror}}"
{{/element.checked}}{{/error}} {{{element.attributes}}} >
{{/element.checked}}{{/error}}
{{#required}}aria-required="true"{{/required}} {{{element.attributes}}} >
{{#text}}
{{{.}}}
{{/text}}
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-select-inline.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{#element.options}}
<option value="{{value}}" {{#selected}}selected{{/selected}} {{#disabled}}disabled{{/disabled}} {{{optionattributes}}}>{{{text}}}</option>
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-select.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{#element.options}}
<option value="{{value}}" {{#selected}}selected{{/selected}} {{#disabled}}disabled{{/disabled}}
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-selectgroups-inline.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{#element.optiongroups}}
{{#text}}
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-selectgroups.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{#element.optiongroups}}
{{#text}}
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-selectwithlink.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{#element.options}}
<option value="{{value}}" {{#selected}}selected{{/selected}} {{#disabled}}disabled{{/disabled}} {{{optionattributes}}}>{{{text}}}</option>
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-tags-inline.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{#element.options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{{text}}}</option>
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-tags.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{#element.options}}
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{{text}}}</option>
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-text-inline.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}}>
{{/element}}
{{/ core_form/element-template-inline }}
3 changes: 3 additions & 0 deletions lib/form/templates/element-text.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}} >
{{/element}}
{{/ core_form/element-template }}
3 changes: 3 additions & 0 deletions lib/form/templates/element-textarea.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{{element.attributes}}}
{{#element.frozen}}
readonly {{#element.hardfrozen}}disabled{{/element.hardfrozen}}
Expand Down
3 changes: 3 additions & 0 deletions lib/form/templates/element-url.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
{{#error}}
autofocus aria-describedby="{{element.iderror}}"
{{/error}}
{{#required}}
aria-required="true"
{{/required}}
{{#element.frozen}}
readonly {{#element.hardfrozen}}disabled{{/element.hardfrozen}}
{{/element.frozen}}
Expand Down
1 change: 1 addition & 0 deletions lib/templates/form_autocomplete_selection.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
}} role="listbox"{{!
}} aria-atomic="true"{{!
}} tabindex="0"{{!
}} {{#required}}aria-required="true"{{/required}}{{!
}} {{#multiple}}aria-multiselectable="true"{{/multiple}}>
{{> core/form_autocomplete_selection_items }}
</div>

0 comments on commit f6a22d3

Please sign in to comment.