576 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
Mathew May
68bf0f5b77 MDL-78885 comboboxsearch: Points from review 2024-03-22 05:50:06 +11:00
Shamim Rezaie
893a9e43d1 MDL-78885 comboboxsearch: Some small fixes
- Remove aria-busy
- Remove aria-label from the listbox element. A listbox that is part of
  a combobox does not need to be labelled.
- No need for the aria-label for the select all checkbox because it is
  already enclosed in the <label> tag.

- Having "view results for ..." as aria-label of listbox options is not
  helpful and only creates noise.
- Deprecated (viewresults,core) as it was not used anymore
- aria-hidden="true" should not be used on .d-none elements
- 'noresults' was falsely documented as a required context variable for
  resultset.mustache. Not only it was not required, it was not even
  provided!

- Remove duplicate code from user_selector.mustache
- Remove the redundant aria-label from search_input_auto. It already has
  a label.
- Fix placeholder missing from one case
2024-03-22 04:25:01 +11:00
Shamim Rezaie
c122998463 MDL-78885 comboboxsearch: Comboboxes should have a meaningful label
Also, used the combobox's label as the dialogue's label as well
2024-03-22 04:24:23 +11:00
Shamim Rezaie
60aa3614f4 MDL-78885 comboboxsearch: Remove the redundant rtl context variable 2024-03-22 04:24:23 +11:00
Shamim Rezaie
a320dff736 MDL-78885 aria: Add support for data-short-text 2024-03-22 04:24:23 +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
b4bb1cde97 MDL-78885 comboboxesearch: Comboboxes should have a name and value
- core_grades_renderer::group_selector() was changed previously, but it
  was providing redundant context data to
core_group/comboboxsearch/group_selector and on the other hand, it was
not providing 'name' and 'value' for core/comboboxsearch
- The $groupactionbaseurl parameter of
  core_grades_renderer::group_selector() is now deprecated as it was not
used.
- a bug is fixed: if only a lastname initial was set, the clear search
  button was not being displayed.
2024-03-22 04:23:25 +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
Ilya Tregubov
1e13aa23b6 Merge branch 'MDL-80850-main' of https://github.com/HuongNV13/moodle 2024-03-21 14:24:42 +08:00
Huong Nguyen
b0220f27cb MDL-80850 Javascript: Add new core/dropzone module 2024-03-21 12:45:55 +07:00
Ilya Tregubov
45750b413e Merge branch 'MDL-81050-main' of https://github.com/roland04/moodle 2024-03-21 10:52:39 +08:00
Mikel Martín
dba1efa28e MDL-81050 navigation: Add data attributes to sections in breadcrumbs
- Add a new method 'add_attribute' to navigation nodes to add HTML attributes to nodes.
- Add data-attribute to section nodes and include them in breadcrumb mustache to automatically update section titles
 when sections are renamed.
2024-03-19 08:53:49 +01:00
Paul Holden
ac4487efd2
MDL-81259 auth: always load password toggle module when required. 2024-03-17 20:35:36 +00: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
e1034deb8b
Merge branch 'MDL-75670-main' of https://github.com/roland04/moodle 2024-03-04 16:05:18 +01:00
Mikel Martín
d0d62fd06c MDL-75670 theme: Refactor form-inline helper class dropped in BS5
- Replace .form-inline Bootstrap helper class with .d-flex.flex-wrap.align-items-center
- Refactor .form-inline occurrences in SCSS files or remove when unneeded
2024-02-29 13:56:46 +01:00
Mikel Martín
4ce883ae21 MDL-75670 theme: Refactor form-group helper class dropped in BS5
- Replace .form-group Boostrap helper class with .mb-3. The .form-group class was only
adding margin bottom styles, so it is an straightforward change.
- Replace .form-group references in SCSS files with .fitem now .form-group has been removed.
- There were some other .form-group occurrences in the code that were using it not for styling
but incorrectly for managing some logic. These have been also replaced with .fitem or removed.
2024-02-29 13:55:37 +01:00
Huong Nguyen
3020fac005
Merge branch 'MDL-80736_main' of https://github.com/marxjohnson/moodle 2024-02-29 09:54:06 +07:00
Jun Pataleta
ae33ac03e5
Merge branch 'MDL-68674-main' of https://github.com/lucaboesch/moodle 2024-02-28 23:04: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
Mark Johnson
2f351c5a8e
MDL-80736 libraries: Move AWS helper code from factor_sms to core\aws 2024-01-29 09:15:19 +00:00
Huong Nguyen
854ba5dc20 Merge branch 'MDL-80676-main' of https://github.com/junpataleta/moodle 2024-01-25 09:07:25 +07:00
Sara Arjona
38bb991912
Merge branch 'MDL-80668' of https://github.com/pedrojordao/moodle 2024-01-24 15:16:10 +01:00
Sara Arjona
eb03b6622d
Merge branch 'MDL-80396-main' of https://github.com/roland04/moodle 2024-01-24 12:29:50 +01:00
Mikel Martín
a198884333 MDL-80259 theme_boost: Refactor badge helper classes for Bootstrap 5 2024-01-23 08:27:23 +01:00
Pedro Jordao
4ad6ca04ef MDL-80668 modal: Change aria roles on modal to improve accessibility.
The roles we were using were no longer the most recommended for modals.
2024-01-19 08:05:43 -03:00
Mikel Martín
d98c7eda66 MDL-80396 theme: Refactor media helper class dropped in BS5 2024-01-19 10:38:38 +01:00
Jun Pataleta
17647186f9
MDL-80676 core: Remove unnecessary aria-labelledby for action menu links
The aria-labelledby attribute for the action menu link's <a> tag is
unnecessary as the <span> tag containing the action menu link's text
is already within the <a> tag and already serves as the link's label by
default.
2024-01-19 14:11:44 +08:00
Mikel Martín
a8b5044920 MDL-80244 theme_boost: Refactor navbar for Bootstrap 5 2024-01-12 08:46:43 +01: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
Sara Arjona
165aa2c318
MDL-72656 course_format: Final deprecation for renderers 2023-12-11 09:00:13 +01:00
Paul Holden
bdbceebb57 MDL-80287 grade: escape current value in search templates. 2023-12-07 08:35:17 +08:00
Mikel Martín
2ea44fb45e
MDL-79629 core_question: Improve autocomplete categories UI 2023-11-02 14:50:10 +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
Paul Holden
5bec400483
MDL-79693 output: remove embedded toast region from clipboard modal.
This was causing the toast notification upon the clipboard action
result to immediately disappear as the modal was closed. The toast
module can happily handle this for us itself, so remove from the
template.
2023-10-17 08:20:54 +01: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
Jun Pataleta
336ec5580a
Merge branch 'MDL-79041-master-2' of https://github.com/HuongNV13/moodle 2023-09-29 11:59:39 +08:00
Ilya Tregubov
12b5c2e952
Merge branch 'MDL-79463' of https://github.com/paulholden/moodle 2023-09-28 16:40:35 +08:00
Huong Nguyen
5c131030fd
MDL-79041 core: Fix typo for MoodleNet resource URL 2023-09-28 11:33:00 +07:00
Huong Nguyen
1dda6c86b8
MDL-79041 core: Better handling of the MoodleNet resource URL
- Switch use PARAM_TEXT instead of PARAM_URL for resource URL
 - Added noreferrer to the Go to MoodleNet drafts button, to avoid the risks associated with opening in
   _blank without removing access to the referrer and opener
2023-09-28 11:32:59 +07:00
Mihail Geshoski
6a4cf000b3 MDL-77035 grades: Fix checkbox spacing to satisfy accessibility criteria 2023-09-22 11:29:53 +02:00
Paul Holden
c518c78ca4
MDL-79463 output: invert logic in url_select change event.
Avoids eslint `consistent-return` errors (because we previously only
returned from the conditional branch).
2023-09-22 10:21:44 +01:00
Mathew May
7f33dfc887 MDL-77035 grades: Update toggleall for a11y 2023-09-20 23:53:44 +02:00
Mihail Geshoski
cda31407e7 MDL-77035 grades: Fix accessibility violation in modals
Adds the aria-labelledby attribute to the .modal element in order to
comply with the modal accessibility requirements.
2023-09-20 23:53:44 +02:00