Removed tabindex="-1" from main element to fix accessibility issue
Description
Removed tabindex="-1" from main
We had a strange issue where TalkBack wasn’t reading content in some xBlocks but was reading some others. I figured out that if you remove tabindex=-1 from <main>, TalkBack works as expected again. Tangentially, this breaks the old method of implementing SkipNav links. Further tangentially, the SkipNav links were already broken (or in this case redundant on mobile). @wittjeff will file two separate issues after this one PR is merged — one for a better way to implement SkipNav links for Learning MFE, and one for a better / functional way to implement SkipNav links for Mobile.
How to reproduce
Go to [this unit](https://courses.edx.org/xblock/block-v1:W3Cx+WAI0.1x+3T2019+type@html+block@2eb3c86c479f44ba964f88ff0bfd9211) on mobile and turn on TalkBack. It will skip main content. For further information on testing go to [Jira Ticket](https://openedx.atlassian.net/browse/LEARNER-7858)
Course-team-authored JS expects $$course_id to be defined
in the global scope. This has worked fine in Legacy courseware,
but due to some differences in page loading (which I don't
understand) between Legacy and Chromeless (ie New/MFE) XBlock
rendering templates, $$course_id wasn't being assigned before
course-team-authored JS was run, causing the scripts to break
on the undefined variable.
The fix here is to assign $$course_id in the <head>,
guaranteeing that the variable is assigned before
any other JS is run.
TNL-7993
Mobile apps load HTML (and other) XBlocks individually using the
render_xblock endpoint. This is an attmept to reduce the number
of requests and JS processing needed to do so by detecting when
we have math content in HTMLBlocks and only adding the Mathjax
resources when necessary.
This is controlled by the "courseware.optimized_render_xblock"
CourseWaffleFlag. For maximum safety, we currently only optimize
in this way when directly hitting HTMLBlocks, and not for
ProblemBlock or VerticalBlock.
This was made as part of edX's Hackathon XXV.
- Hide the submit-button CTA link to reset dates in the mobile
app. They are working on their own solution.
- Don't show the dates_banner.html code in the courseware. It has
new CTA banner support with updated wording.
- use new dates banner template on course outline page
- remove old banner from main.html
- let dates tab use new dates banner template
- remove dates banner completely from the courseware problem view
on the web app
- use new banner on the courseware problem view on the mobile app
- update banner util to use get_course_blocks
[TNL-7043] If vertical block content is in an iframe in the learning microfrontend app, add a base tag in the head (of the iframe document) to force links to navigate the parent window.
This makes it easier for CSS rules to target chromeless mode. This is
useful for xblocks which want to use some CSS tweaks specific to the
chromeless view.
* Add openedx.core.lib.xblock_builtin.get_css_dependencies and get_js_dependencies,
which respect PIPELINE_ENABLED setting when determining dependencies.
* Move new discussion-related Sass files into discussion subdirectory.
* Use "load_unicode" instead of "render_template" to load JS to add to fragment for DiscussionXBlock.
* Remove unused "course" parameter from context for DiscussionXBlock.student_view.
* Add RTL stylesheet for DiscussionXBlock, and enable the block to load correct stylesheet.
* Load MathJax only once, and include code for configuring MathJax in discussion bundle.
* Make sure username renders correctly in DiscussionXBlock response header.
* Move WYSIWYIG Markdown editor styles to _build-discussion.scss.
* Remove unnecessary import of discussion/utilities/v1-compatibility from _build-discussion.scss.
* Keep courseware-chromeless.html in sync with courseware.html.
* Load CSS for discussions on Teams tab. This makes it possible to remove CSS for discussions from Sass files for "Course" tab.
* Load js/src/tooltip_manager.js, jquery.autocomplete.js and jquery.autocomplete.css on "Course" tab.
* Add openedx.core.lib.xblock_builtin.get_css_dependencies and get_js_dependencies,
which respect PIPELINE_ENABLED setting when determining dependencies.
* Move new discussion-related Sass files into discussion subdirectory.
* Use "load_unicode" instead of "render_template" to load JS to add to fragment for DiscussionXBlock.
* Remove unused "course" parameter from context for DiscussionXBlock.student_view.
* Add RTL stylesheet for DiscussionXBlock, and enable the block to load correct stylesheet.
* Load MathJax only once, and include code for configuring MathJax in discussion bundle.
* Make sure username renders correctly in DiscussionXBlock response header.
* Move WYSIWYIG Markdown editor styles to _build-discussion.scss.
* Remove unnecessary import of discussion/utilities/v1-compatibility from _build-discussion.scss.
* Keep courseware-chromeless.html in sync with courseware.html.
* Load CSS for discussions on Teams tab. This makes it possible to remove CSS for discussions from Sass files for "Course" tab.
* Load js/src/tooltip_manager.js, jquery.autocomplete.js and jquery.autocomplete.css on "Course" tab.
This was originally contributed upstream by Stanford, circa 2013.
We neither use nor support this feature in its current implementation,
and in fact, we may never have used this production. Until recently, we
had additional chat/Jabber code [1] (in the form of a Jabber djangoapp in
LMS); context there suggests this feature may have never been more than
a prototype. The original author is no longer on the team, so I can't directly
confirm this on our end.
Do you use this feature?
Stanford had already abandoned this Jabber-backed chat implementation,
in favor of an IRC backend, by the time I joined the team in early 2014.
[1] dbe52a6b13