$(function() {
    var markdownTable = $('.markdown-table-wrap');

    if (markdownTable.length) {
        $('<button class="btn btn--secondary btn--mobile-table-hide">Close table</button>').insertAfter(markdownTable.find('table'));

        $('.btn--mobile-table-show').click(function () {
            $(this).closest('.markdown-table-container').find('.markdown-table-wrap').show();
        });

        $('.btn--mobile-table-hide').click(function () {
            $(this).closest('.markdown-table-wrap').css('display', '');
        });
    }
});

@@ -378,16 +378,147 @@
 show();%0A
+            $(this).closest('.markdown-table-container').find('.markdown-table-wrap').find('table').attr(%22tabindex%22, %220%22).focus();%0A
         
@@ -603,34 +603,32 @@
 is).closest(
-'.
 markdown
 -table-wrap'
@@ -615,28 +615,21 @@
 markdown
--t
+T
 able
--wrap'
 ).css('d
@@ -642,16 +642,114 @@
 ', '');%0A
+            $(this).closest('.markdown-table-container').find('.btn--mobile-table-show').focus();%0A
         

update js enhancement to automatically focus on table when opened on mobile and return focus to view table when closed