Legacy branch: Accessibility is broken when multi languages are enabled
Subject of the issue/enhancement/features
#accessibility-toggle is removed on this line https://github.com/adaptlearning/adapt-contrib-languagePicker/blob/29bf71a865de5798ba74d325f4aae369c251340f/js/languagePickerView.js#L39 and it is never re-added.
@moloko has recommended something like:
setupToggleButton: function() {
if (this.isEnabled()) {
if ($('#accessibility-toggle').length === 0) {
$('body').prepend('<button id="accessibility-toggle" class="base button a11y-ignore-focus"></button>');
}
new AccessibilityView();
} else {
this.$accessibilityToggle.addClass("a11y-ignore").a11y_cntrl_enabled(false);
}
},
However, as a result of the above code, when testing the tabbing to #accessibility-toggle it can't be navigated to unless shift-tabbing.
Your environment
Framework version: v2.2.6 Browser: Google Chrome v67.0.3396.99 (any browser should show the same result)
Steps to reproduce
- Add 2+ languages using the languagePicker extension
- Navigate to the course
- Choose a language and try tabbing to enable accessibility/inspect the DOM for the
#accessibility-togglebutton
Expected behaviour
The #accessibility-toggle button should exist after picking a language and should be navigable using the tab key
Actual behaviour
The #accessibility-toggle button doesn't exist after picking a language
This could be closed as v3 fixed the problem.