MDL-71669 editor_atto: Set proper roles to toolbar menus
commita42008f2ae3cbc279a573f1e1524b0481eec4a35
authorJun Pataleta <jun@moodle.com>
Tue, 1 Jun 2021 04:04:12 +0000 (1 12:04 +0800)
committerJun Pataleta <jun@moodle.com>
Wed, 23 Jun 2021 05:13:07 +0000 (23 13:13 +0800)
treecc2e8f87b26dfaabd901853d13c50b3334eaf007
parent10daae7ab701d6d614b3809c5f39bdea26c020f5
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
lib/editor/atto/yui/build/moodle-editor_atto-menu/moodle-editor_atto-menu-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-menu/moodle-editor_atto-menu-min.js
lib/editor/atto/yui/build/moodle-editor_atto-menu/moodle-editor_atto-menu.js
lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-debug.js
lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin-min.js
lib/editor/atto/yui/build/moodle-editor_atto-plugin/moodle-editor_atto-plugin.js
lib/editor/atto/yui/src/editor/js/editor-plugin-buttons.js
lib/editor/atto/yui/src/editor/js/menu.js