From 186cc9f16c8c35ed453901ea89f6b34a57164e80 Mon Sep 17 00:00:00 2001
From: jawad khan <jawadkhan444@gmail.com>
Date: Wed, 24 Mar 2021 11:15:16 +0500
Subject: [PATCH] LEARNER-7858 (#26967)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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)
---
 lms/templates/courseware/courseware-chromeless.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lms/templates/courseware/courseware-chromeless.html b/lms/templates/courseware/courseware-chromeless.html
index efb614c81af..81e4989956e 100644
--- a/lms/templates/courseware/courseware-chromeless.html
+++ b/lms/templates/courseware/courseware-chromeless.html
@@ -87,7 +87,7 @@ ${HTML(fragment.foot_html())}
     % endif
     style="display: block; width: auto; margin: 0;"
   >
-      <main id="main" tabindex="-1" aria-label="Content">
+      <main id="main" aria-label="Content">
         ${HTML(fragment.body_html())}
       </main>
   </section>
-- 
GitLab