From 4dcdb83e44fc74bc01303a04459afbc1af8b5839 Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Thu, 18 Feb 2021 15:02:04 +0000 Subject: [PATCH] Remove id from table used for the row numbers The fullscreenTable component has 2 layers to the table you see onscreen: 1. the actual data table 2. a clone, with only the first column showing, that sits on top so the row numbers stay in place while you scroll Table 1. has an id attribute on its caption. The region wrapping it has an aria-describedby attribute with the id as its value. This makes the caption the description for the region. This isn't needed for the clone and makes the HTML invalid because ids should be unique. This removes the id from the cloned table. --- app/assets/javascripts/fullscreenTable.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/fullscreenTable.js b/app/assets/javascripts/fullscreenTable.js index 1cfa858d9..cef792052 100644 --- a/app/assets/javascripts/fullscreenTable.js +++ b/app/assets/javascripts/fullscreenTable.js @@ -51,6 +51,9 @@ .removeClass('fullscreen-scrollable-table') .removeAttr(attributesForFocus) .attr('aria-hidden', true) + .find('caption') + .removeAttr('id') + .closest('.fullscreen-fixed-table') ) .append( '
'