adapt_framework icon indicating copy to clipboard operation
adapt_framework copied to clipboard

Legacy branch: Accessibility is broken when multi languages are enabled

Open nilslp opened this issue 8 years ago • 1 comments

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-toggle button

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

nilslp avatar Jul 31 '18 08:07 nilslp

This could be closed as v3 fixed the problem.

nilslp avatar Feb 19 '19 12:02 nilslp