Skip to content

Notes from Robert 2017

Siwei "Robert" Li edited this page Apr 20, 2017 · 1 revision

Notes from Robert

  • by Siwei "Robert" Li who worked on Runestone in Spring 2017

TOC

Accessibility Improvement

In order to better support screen readers and make the page comply with ARIA and WCAG accessibility standards, keyboard trap in ActiveCode is removed so that users who depend on tab navigation has a way to tab out of the ActiveCode instance of CodeMirror.

When page is loaded, if user use tab navigation (hitting tab other that in the code editor), then the editor will no longer treat tab as a 4 space indentation shortcut, but rather letting the user tab out of the text area. If the user wants to tab back to previous nodes of focus (at this time, Runestone ActiveCode has Run buttons above the editor, thus users need to frequently tab back), the user can use shift-tab.

Also some multi-page timed exams had pagination that was not focusable by tab. This has also been fixed so that screen reader and tab access is guaranteed.

Bug Fix

Timed Exams used to have a bug where a student could select an option and then hit enter/return key and the answer of multiple choice will show up without submitting the exam. This is caused as the time exam multiple choice inherits from regular multiple choice component which has a "Check Me" button as the default form submission button, which will show the answer of the question. The original code in Timed Exams only hides the "Check Me" button without disabling the form to submit, thus hitting enter/return key will effectively hit the "Check Me" button and disclose the answer.

Extension

One extension I'm developing is a version of code-speed-type (SpeedType) for Runestone. SpeedType is one of my projects used for memorizing code interactively by typing code on the web in a game setting. SpeedType is originally designed to support Github as an Chrome/Firefox extension, but it Runestone version can also come in the form of an Sphinx Extension. In the Runestone version, when SpeedType option is enabled by the ebook author, students will see a button called "Speed Type" when hovering their cursors over code blocks on the page (generated by .. code-block:: directive in rst). Clicking the button will open up the SpeedType interface. This module is still being tested and improved.

I'm also envisioning adding a separate directive from .. code-block:: to directly show SpeedType widget in Runestone. This is still under design.