MDL-71669 atto_table: Set appropriate ARIA roles for table button
commit335e628e2772828edd0cad045b2e5f75336f2e9c
authorJun Pataleta <jun@moodle.com>
Tue, 1 Jun 2021 04:50:24 +0000 (1 12:50 +0800)
committerJun Pataleta <jun@moodle.com>
Wed, 23 Jun 2021 05:10:16 +0000 (23 13:10 +0800)
tree49677a19f788e842ef6f088f7a52d92203589c56
parent2874db9bd516276d939178313547328cc882528d
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.
lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js
lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-min.js
lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button.js
lib/editor/atto/plugins/table/yui/src/button/js/button.js