diff --git a/app/assets/javascripts/fullscreenTable.js b/app/assets/javascripts/fullscreenTable.js index cef792052..2abe12c15 100644 --- a/app/assets/javascripts/fullscreenTable.js +++ b/app/assets/javascripts/fullscreenTable.js @@ -22,7 +22,6 @@ this.$scrollableTable .on('scroll', this.toggleShadows) .on('scroll', this.maintainHeight) - .on('focus blur', () => this.$component.toggleClass('js-focus-style')); if ( window.GOVUK.stickAtBottomWhenScrolling && @@ -31,17 +30,17 @@ window.GOVUK.stickAtBottomWhenScrolling.recalculate(); } - this.maintainWidth(); + this.maintainWidth();npm }; this.insertShims = () => { - const attributesForFocus = 'role aria-labelledby tabindex'; + const attributesForFocus = 'role aria-labelledby'; let captionId = this.$table.find('caption').text().toLowerCase().replace(/[^A-Za-z]+/g, ''); this.$table.find('caption').attr('id', captionId); - this.$table.wrap(`
`); + this.$table.wrap(`
`); this.$component .append( diff --git a/app/templates/views/send.html b/app/templates/views/send.html index 98ab1f505..f7fcbd0cb 100644 --- a/app/templates/views/send.html +++ b/app/templates/views/send.html @@ -77,7 +77,7 @@
{% call(item, row_number) list_table( example, - caption="Example", + caption="Example spreadsheet", caption_visible=False, field_headings=[''] + column_headings ) %} diff --git a/tests/javascripts/fullscreenTable.test.js b/tests/javascripts/fullscreenTable.test.js index c8d89d962..ef1013a1f 100644 --- a/tests/javascripts/fullscreenTable.test.js +++ b/tests/javascripts/fullscreenTable.test.js @@ -347,24 +347,4 @@ describe('FullscreenTable', () => { }); - describe("when the table is focused", () => { - - beforeEach(() => { - - // start module - window.GOVUK.modules.start(); - - tableFrame = document.querySelector('.fullscreen-scrollable-table'); - tableFrame.focus(); - - }); - - test("it should make the parent frame a focus style", () => { - - expect(container.classList.contains('js-focus-style')).toBe(true); - - }); - - }); - });