890 Commits

Author SHA1 Message Date
Jun Pataleta
281fecbd54
Merge branch 'MDL-78885-main' of https://github.com/rezaies/moodle 2024-03-25 23:37:57 +08:00
Huong Nguyen
c53fc0e0c9
Merge branch 'MDL-79829-main' of https://github.com/laurentdavid/moodle 2024-03-25 09:22:20 +07:00
Mathew May
68bf0f5b77 MDL-78885 comboboxsearch: Points from review 2024-03-22 05:50:06 +11:00
Shamim Rezaie
2ac9dc9108 MDL-78885 comboboxsearch: Deprecate trigger 2024-03-22 05:49:52 +11:00
Shamim Rezaie
1c377fc61e MDL-78885 comboboxsearch: Show x button when user search is not empty 2024-03-22 04:24:23 +11:00
Shamim Rezaie
50eeafeb7d MDL-78885 comboboxsearch: Improve user search and keyboard handling
- Prevent rerendering of the menu when it's already open to preserve the
  selected/highlighted option.
- Allow ArrowUp and ArrowDown to trigger the user search dropdown for
  improved keyboard navigation.

This commit ensures that the menu is not re-rendered when it's already
open, preserving the selected option to enhance the user experience.
Additionally, ArrowUp and ArrowDown keys now trigger the dropdown,
improving keyboard navigation and user interactions.
2024-03-22 04:24:20 +11:00
Shamim Rezaie
8e2555dc48 MDL-78885 comboboxsearch: Switch event listener from 'click' to 'change'
Move from listening to 'click' to listening to 'change'
2024-03-22 04:23:55 +11:00
Shamim Rezaie
bff7c88878 MDL-78885 comboboxsearch: .dropdown() calls should be on toggle element
Introduced the toggle property.
2024-03-22 04:23:26 +11:00
Shamim Rezaie
d886cba9d3 MDL-78885 comboboxsearch: Enable aria.js for auto handling
- Added the `dropdown` class to ensure toggle element focus when the
  dropdown is closed.
- Improved keyboard handling by adding the `dropdown` class.
  aria.js will automatically handle keyboard interactions.
- Removed redundant keyboard handling.
- The "view all results" option is just a normal option in a combobox.
  It should not be treated as the default action for a combobox.
- Ensured correct markup for 'Esc' key handling. aria.js automatically
  focuses on the toggle element if the dropdown's toggle and the
  dropdown menu are wrapped within a .dropdown element.
- Implemented menu closure for outside clicks and when leaving the edit
  box.
- Manually focused on the user search element when opening the search
 dropdown due to a focusLock issue.
- Fix the issue of another dropdown staying open
- Clicking on the clearSearchButton should not close the dropdown
2024-03-22 04:22:24 +11:00
Shamim Rezaie
e0d2a3924e MDL-78885 aria: Automatically trap focus inside dialog dropdowns
- there is no need to set the focus after a dropdown is opened. It is
automatically set as the result of trapping focus.
2024-03-22 04:00:18 +11:00
Shamim Rezaie
d18f7bf5cd MDL-78885 core: combobox should have a valid aria-controls
- The aria-controls attribute cannot refer to an element that doesn't
  exist
- Also update filterDataset so it returns [] when searchTerm is empty
2024-03-22 04:00:15 +11:00
Mathew May
e4083441ec MDL-78885 core_user: A11y fixes for user combobox search
Co-authored-by: Shamim Rezaie <shamim@moodle.com>
2024-03-22 03:26:19 +11:00
Huong Nguyen
b0220f27cb MDL-80850 Javascript: Add new core/dropzone module 2024-03-21 12:45:55 +07:00
Huong Nguyen
34bb16ab27 MDL-79769 core: Tidy up core/togglesensitive 2024-03-12 09:19:58 +07:00
Huong Nguyen
88dc0f5010 Merge branch 'MDL-79769-master' of https://github.com/davewoloszyn/moodle 2024-03-12 09:18:10 +07:00
Laurent David
9497db441a MDL-79829 core: Reactive drag and drop cursor
* When dragging and dropping an item, the cursor should be
set to "move" and not copy.
2024-03-11 09:24:25 +01:00
David Woloszyn
cd935eb3e2 MDL-79769 login: Fix focus loss of loginpageautofocus setting
Added new form event to fix login fields focus loss when DOM is
manipulated by togglesensitive.
2024-03-08 15:54:37 +11:00
David Woloszyn
cb6acfc46a MDL-79769 login: Add password toggle icon to the login screen 2024-03-08 15:54:11 +11:00
Sara Arjona
46e6d412bf
Merge branch 'MDL-80634' of https://github.com/paulholden/moodle 2024-03-07 17:47:20 +01:00
Paul Holden
04f54d8eb0
MDL-80634 libraries: upgrade to version 4.4.2 of ChartJS. 2024-03-07 11:11:14 +00:00
Jun Pataleta
f6a22d3e61
Merge branch 'MDL-80805-main' of https://github.com/sammarshallou/moodle 2024-02-23 17:32:05 +08:00
sam marshall
14b1e93e85 MDL-80805 core_form: Accessibility - add aria-required to form fields
Most types of form field will now include aria-required="true" if the
field is marked as required. This causes assistive technology to inform
users that the field is required.

Before this change, in some cases (e.g. screen reader users tabbing
through fields) users were not informed that a field is required.
2024-02-15 14:30:33 +00:00
Paul Holden
d057af03e9
MDL-79788 tag: convert tag collection page to reportbuilder report. 2024-02-08 16:31:02 +00:00
Justus Dieckmann
216047dc18
MDL-79498 javascript: Adjust get_string function signature
Reflect param and lang being optional parameters.
2024-01-18 10:51:02 +08:00
Ilya Tregubov
1e83b9eba7 Merge branch 'MDL-79985-master' of https://github.com/ferranrecio/moodle 2023-12-20 09:06:08 +08:00
Ferran Recio
02de5b79fd MDL-79985 output: prepare dropdown components for forms
Add new features to the dropdown components (dialog and status) needed
for using them in quick forms. Now the dialog dropdown have methods to
disable the dropdown button (to disable the field). The status dropdown
has one minor style bugfix and the selected item styles are now stored
as a data attribute.
2023-12-19 09:33:45 +01:00
Paul Holden
3019f4e57c
MDL-80393 lang: expose current page language to JS modules.
Since 4be39296 the root HTML element contains the iso6391 language
code of the current language pack. However various JS modules need
access to the original Moodle language pack code, so expose that
in the `M.cfg` structure.
2023-12-19 07:47:15 +00:00
Jun Pataleta
d953068659
MDL-79061 course: Create a sr-only mutations logger
* Create SRLogger that extends from the default Logger class. This
logger outputs the feedback to a sr-only ARIA live region to allow
screen readers to announce the feedback from mutations.
* Update the course editor to use the SRLogger.
2023-12-07 10:43:28 +08:00
Ferran Recio
d8c0e1880f
MDL-79061 core: Mechanism for logging mutation feedbacks
* Create a mechanism for logging mutation feedbacks.
* The mutation feedbacks are displayed as a toast by default.
* Apply this logging mechanism on the course homepage to provide
feedback for the results of actions performed on course modules and
course sections.
2023-12-07 10:43:28 +08:00
Ilya Tregubov
abf2c568be
Merge branch 'mdl67898-check-setting-admintree' of https://github.com/matthewhilton/moodle 2023-11-23 10:25:20 +08:00
Matthew Hilton
9b8acd44d1
MDL-67898 check: Add check admin setting
This admin setting allows you to display a check anywhere in the admin
tree. It uses a webservice to execute the check, so the impact on the
admin tree performance is as low as possible.

Checks do not necessarily need to be registered in the plugins callback
to be shown here, allowing customisation of what is shown in the
settings versus the reports.
2023-11-21 12:04:42 +10:00
Mikel Martín
1a7732b195 MDL-75673 core: Add popper v2.11.8 lib 2023-11-16 17:45:41 +01:00
Paul Holden
58d9babe56
MDL-79629 javascript: native promises enhancing autocomplete module.
Preserve existing `enhance` method return of jQuery style promises to
allow calling code to continue relying on that (e.g. when calling old
style `.done` and `.fail`).

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-11-08 20:05:35 +00:00
Sara Arjona
2fc405aa35
Merge branch 'MDL-79629' of https://github.com/paulholden/moodle 2023-11-08 09:57:30 +01:00
Huong Nguyen
1e256012a1 Merge branch 'MDL-78953' of https://github.com/pedrojordao/moodle 2023-11-07 15:33:29 +07:00
Pedro Jordao
2d73818742 MDL-78953 autocomplete: Add only one empty option when deselecting item.
Each option that was deselected was prepending an empty option in the select.
2023-11-02 18:35:21 -03:00
Paul Holden
4fff2059b8
MDL-79646 javascript: add class to dropped item after drag/drop. 2023-11-02 14:56:26 +00:00
Mikel Martín
e9afd7f072
MDL-79629 forms: Improvements to autocomplete form element
- Preserve autocomplete input options classes to the autocomplete suggestions
- Add new styles for suggestions headings
- Add a new class selector form-autocomplete-input so input can be easily selected
  for styling.

Various improvements to make the module more re-usable elsewhere:
change event bubbling, promise argument support when enhancing.

Co-authored-by: Paul Holden <paulh@moodle.com>
2023-11-02 14:50:10 +00:00
Jun Pataleta
c5b11f6eb4
Merge branch 'MDL-79194-master' of https://github.com/laurentdavid/moodle 2023-10-27 23:34:07 +08:00
Ferran Recio
3cb49765a4 MDL-79194 core_courseformat: optimize section reload
* When reloading a section, we also forced the reloading of
course modules, resulting in doing the same work twice (once for
the section reload and once for the course module reload)
* Debounce the reloading process so prevent unwanted duplicate
reloads
2023-10-26 11:03:52 +02:00
Andrew Nicols
37092a6485
MDL-79693 core: Move toast regions to document on modal close 2023-10-13 14:16:52 +01:00
Sara Arjona
563851857f
Merge branch 'MDL-79602-master' of https://github.com/HuongNV13/moodle 2023-10-05 13:03:46 +02:00
Huong Nguyen
d0294388d7
MDL-79602 core: Handle empty selection for MoodleNet 2023-10-05 12:10:11 +07:00
Ilya Tregubov
f2ba761bef
Merge branch 'MDL-79157-master' of https://github.com/ferranrecio/moodle 2023-10-04 18:49:19 +08:00
Ferran Recio
0c6a581f1e MDL-79157 output: fix menu subpanels keyboard navigation 2023-10-04 11:07:45 +02:00
Huong Nguyen
5602cc2488
Merge branch 'MDL-79548-master' of https://github.com/mickhawkins/moodle 2023-10-04 10:21:41 +07:00
Ferran Recio
3f985bf3cf
MDL-79458 output: fix subpanels in classic 2023-10-03 13:32:27 +02:00
Michael Hawkins
83998b9ba9
MDL-79548 core: Update MoodleNet modal strings so they can be translated
Previously, the type of share (course/activity) was being injected into
the string, but not from a translation, so did not fully translate. The
MoodleNet type (resource) was working, but has also been replaced here
to avoid inserting one string into another (this was also unnecessary
while resource is the only possible option). This also meant the latter
string could be deprecated.
2023-10-03 18:52:38 +08:00
Huong Nguyen
4a7259f236
Merge branch 'MDL-79224_master' of https://github.com/marxjohnson/moodle 2023-10-03 09:38:53 +07:00
Mark Johnson
6401ca4959 MDL-79224 core: Make Binary datafilter redisplay selected value
The Binary datafilter was returning a single value where all parts of
the API expect an array of values. This was working in most places by
fluke as this value was a single-character string, so doing $value[0]
returned the value. However, it was not working when deciding which
option to mark as selected when re-displaying the filter.

This change makes the filter return an array containing a single integer
value to match the rest of the API, then internally selects that single
value for comparison when deciding if an option should be selected.
2023-10-02 11:50:44 +01:00