1481 Commits

Author SHA1 Message Date
Sara Arjona
ff6e6ca8d2 Merge branch 'MDL-71674-master' of https://github.com/dcai/moodle 2021-09-01 11:36:33 +02:00
Dongsheng Cai
44f85767ab MDL-71674 editor_atto: more assessible errors 2021-09-01 18:15:49 +10:00
abgreeve
a926f529b4 Merge branch 'MDL-72223' of https://github.com/paulholden/moodle 2021-08-30 15:40:44 +08:00
Sara Arjona
d91e9ccee8 Merge branch 'MDL-71603-master' of git://github.com/rezaies/moodle 2021-08-23 17:04:26 +02:00
Nhan Vo
7bcd58783f
MDL-68639 HTML Editor (Atto): Invalid HTML for nested lists 2021-08-17 02:51:14 +07:00
Paul Holden
2661214376 MDL-72223 atto_link: link text should match selected text.
Rather then using all text of the currently selected node, instead
use that text the user has currently selected.
2021-08-10 09:45:48 +01:00
Huong Nguyen
80bf558bea MDL-71656 atto: Add meaningful labels to colour items
Colour chooser supported:
 - atto_fontcolor
 - atto_backcolor
2021-08-09 16:00:21 +07:00
Shamim Rezaie
d93fb10f88 MDL-71603 editor_atto: set aria-pressed when a button status is changed 2021-07-28 16:45:27 +10:00
Shamim Rezaie
1eeb7ce395 MDL-71603 editor_atto: Make button icons decorative only 2021-07-28 15:43:59 +10:00
Shamim Rezaie
b078f18c6e MDL-71603 editor_atto: Use aria-expanded for show/hide buttons toggle 2021-07-28 15:43:59 +10:00
Shamim Rezaie
7029fa056c MDL-71603 editor_atto: Focus on the toggled row
quoted from
https://www.accessibility-developer-guide.com/examples/sensible-aria-usage/expanded/

As a general rule, the toggled element should be right below the toggle
button, so screen readers will find it easily. If that is not the case,
then the focus should be placed inside the element upon toggling it
visible, and back to the initial element upon toggling it invisible.
2021-07-28 15:43:59 +10:00
Shamim Rezaie
90b3d575e3 MDL-71603 editor_atto: Wrap toolbar buttons in toolbar rows 2021-07-28 15:43:21 +10:00
Ilya Tregubov
ec50dc2fb7 Merge branch 'MDL-72179-master' of git://github.com/andrewnicols/moodle 2021-07-27 12:36:38 +02:00
Ilya Tregubov
3a55ff2c55 Merge branch 'MDL-71672-master-2' of git://github.com/rezaies/moodle 2021-07-27 11:59:15 +02:00
Andrew Nicols
776f4bd80c MDL-72179 behat: Make use of page resolvers 2021-07-26 15:14:28 +08:00
Ilya Tregubov
501bc9e117 Merge branch 'MDL-71604-master' of git://github.com/rezaies/moodle 2021-07-20 14:09:11 +02:00
Shamim Rezaie
e2150f7da0 MDL-72078 editor_atto: Use role=application and aria-describedby in Atto
According to https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Application_Role
WYSIWYG web editors are proper use of the application role.
2021-07-19 16:45:20 +10:00
Shamim Rezaie
da509ff492 MDL-71604 editor_atto: Move accessibility buttons to the first row 2021-07-19 16:42:25 +10:00
Shamim Rezaie
902ab1e2f6 MDL-71672 atto_equation: Fix the markup and the initial focused element
The initial focused element should be the first operator button.
This commit also fixes the accessibility issues that previously were
wrongly fixed by a redundant click on the first tab using javascript.
2021-07-19 16:40:10 +10:00
Shamim Rezaie
fd18007c1b MDL-71672 atto_managefiles: Focus the first file manager button 2021-07-19 16:40:10 +10:00
Shamim Rezaie
52c1e68631 MDL-71672 atto_emojipicker: Focus the search bar initially 2021-07-19 16:40:10 +10:00
Shamim Rezaie
9e801be452 MDL-71672 atto_recordrtc: focus Atto button after hide 2021-07-19 16:40:10 +10:00
Sara Arjona
a81c372f00 MDL-72036 atto_h5p: Random error with external URL
After a major upgrade was done in h5p.com, some random errors appeared
in the "H5P options are ignored for H5P URLs" scenario.
They have been fixed replacing the URL for different (which should
load quicker). As we're checking external content, no other improvement
can be done on the Moodle site.
2021-07-13 08:36:33 +02:00
Eloy Lafuente (stronk7)
17135030cc Merge branch 'MDL-66539-master' of git://github.com/HuongNV13/moodle 2021-06-29 18:37:20 +02:00
Jun Pataleta
242ccc4752 MDL-71669 atto_table: Set appropriate ARIA roles for table button
The table button can become a menu button when the cursor's position
in the editor is within a table. So we'd need to update the button with
ARIA attributes appropriate for a menu button.
This is best done when the button's highlight gets toggled, so we're
adding an event listener for when this happens and add/remove the ARIA
attributes accordingly.
2021-06-23 12:55:02 +08:00
Jun Pataleta
2dcede1b0b MDL-71669 editor_atto: Fire custom event when toggling button highlight 2021-06-23 12:55:02 +08:00
Jun Pataleta
45906644be MDL-71669 editor_atto: Create an events module for the atto editor 2021-06-23 12:55:01 +08:00
Jun Pataleta
9d943c4ff9 MDL-71669 editor_atto: Set proper roles to toolbar menus
* Menu button fix
  - Added aria-haspopup, aria-controls, and aria-expanded attributes.
* Menu fixes
  - Added aria-labelledby that points to the menu button label.
  - Removed the dialog role in the menu's container.
  - The ul tag needs the "menu" role.
  - The li tag needs the role "none" instead of the "presentation" role

Reference:
https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton
2021-06-18 15:20:08 +08:00
Huong Nguyen
6372d61f71 MDL-66539 atto_link: Non-intuitive action for atto link button 2021-06-01 08:52:32 +07:00
Andrew Nicols
1aa1276a84 Merge branch 'MDL-71047-master' of https://github.com/NashTechOpenUniversity/moodle 2021-05-27 11:18:14 +08:00
Andrew Nicols
a44cee78f1 MDL-70990 core_editor: Replace EDITOR_CONTENT_RESTORED event
The legacy M.core.event.EDITOR_CONTENT_RESTORED event has been replaced
with a new core_editor/events::editorContentRestored native DOM event.

The new event can be listened to at any point in the DOM using the
following syntax:

```
import {eventTypes} from 'core_editor/events';

document.addEventListener(eventTypes.editorContentRestored, handler);
```

A backward-compatabibility layer is included to ensure that any legacy
jQuery event is still called with the same arguments.

This legacy bridge will be removed after Moodle 4.3.
2021-05-26 10:47:03 +08:00
Andrew Nicols
a1ccefe2ac MDL-70990 core_form: Standardise event name usage
The `types` object introduced in Moodle 3.11 has been replaced with the
`eventTypes` object which is used consistently across all CustomEvent
definitinos.

Likewise the trigger functions have been renamed from
`triggerUploadStarted` to `notifyUploadStarted` and from
`triggerUploadCompleted` to `notifyUploadCompleted`.

Backwards compatability is maintained.
2021-05-26 10:46:52 +08:00
Nhan Vo
e1c7a18677
MDL-71047 HTML Editor (Atto): Cursor position is not correct when paste 2021-05-17 09:50:58 +07:00
Eloy Lafuente (stronk7)
9d6aa39985 MDL-71583 versions: Add all the missing full-stops to version/requires
It seems that the new phpcs3 checker is now controlling those
line comments that previously were ignored.

This commit just looks for all the cases and bulk-add
them when needed. The bash script (mac) used to add all them is:

while read -r line; do
    arr=(${line//:/ })
    if [[ -n ${arr[0]} ]] && [[ -n ${arr[1]} ]]; then
        echo "  file ${arr[0]}, line ${arr[1]}"
        sed -i "${arr[1]}s/\$/\./" ${arr[0]}
    fi
done < <(find . -name version.php | xargs ag --nomultiline '>(version|requires) *=.*//.*[^;\.]$')
2021-05-11 20:11:07 +02:00
Jake Dallimore
e5e5a06190 Merge branch 'MDL-52724-master' of git://github.com/merrill-oakland/moodle 2021-05-03 13:25:05 +08:00
Jun Pataleta
c646a8eaec Merge branch 'MDL-70947-master' of git://github.com/HuongNV13/moodle 2021-04-30 10:34:11 +08:00
Huong Nguyen
c6fb80b639 MDL-70947 File upload: Upload protection
Interacts badly with double-submit protection, and not all uploads protected
2021-04-29 15:28:19 +07:00
Sara Arjona
92cfa71cd0 Merge branch 'MDL-70763' of git://github.com/paulholden/moodle 2021-04-28 12:36:23 +02:00
Eric Merrill
59704c659c MDL-52724 editor_atto: Scrub atto html for invalid ol, ul, and li tags
Try to correct broken ul/ol/li tags, as they have an outsized impact
on course layout. Uses basic regex and loops to track open and closed
tags.

Also adds a deep clean option to the HTML cleaner, that runs less
frequent, more intensive cleanings. This is because normally _cleanHTML
gets called after each keystroke, which could cause problems with
large content on weak systems.

Behat changes are a fix for setting multiline strings in Atto, and
creating a multiline match step.
2021-04-08 15:20:24 -04:00
Paul Holden
3b9e53c7e1 MDL-70763 core: export preferences for correct user.
Ensure we are using the ID of the given user rather than falling
back to that of the current user during privacy export.
2021-04-04 23:15:23 +01:00
Andrew Nicols
01266b38c0 Merge branch 'MDL-65776-master' of git://github.com/sarjona/moodle 2021-03-25 11:03:32 +08:00
Sara Arjona
a5558e1ae5 MDL-65776 libraries: Set moodle files after jsbeautify upgrade 2021-03-19 15:22:36 +01:00
Sara Arjona
84d8da8314 MDL-65776 libraries: Upgrade jsbeautify to 1.13 2021-03-19 15:22:35 +01:00
Peter Dias
ce863f7ded MDL-70313 core: Update the thirdpartylib.xml 2021-03-15 10:25:28 +08:00
Peter Dias
7e308ac133 MDL-70313 core: Rebuilt module files 2021-03-15 10:25:28 +08:00
Peter Dias
fdabce2329 MDL-70313 core: Update codemirror to 5.59.4 2021-03-15 10:25:28 +08:00
Eloy Lafuente (stronk7)
77342b96fc MDL-69308 upgrade: remove all the < 3.6.0 upgrade steps
This just deletes all the upgrade steps previous to 3.6.0. Some
small adjustments, like tweaking globals can also be applied
when needed.

Also includes an upgrade step to prevent upgrading from any
version < 2018120300 (v3.6.0) as anti-cheating measure.

Note that in this case, there wasn't any case of upgradelib
functions being used, hence we haven't to deprecate/remove
anything in codebase. When there is such a need, that is done
in separate commits (one for each function) and documented here.

See MDL-65809 commits for an example removing/deprecating a
good number of functions.
2021-01-13 19:11:19 +01:00
Andrew Nicols
7d70165c25 MDL-70167 behat: Boolean attributes should either exist or not 2020-11-23 11:02:36 +08:00
Matt Clarkson
541e90c32c MDL-68722 atto_equation: fix for form elements with special characters
Element id's containing characters such as ':' would break the tab
selector in bootstrap.

This specifically affects the essay question type.
2020-10-28 09:26:43 +13:00
Bas Brands
609d8b380e MDL-69395 theme_boost: improve colour contrast for form input fields
- for this issue the atto styles.css was moved into theme boost so
we can use our preset variable for $gray-500
2020-09-09 09:59:08 +02:00