diff --git a/assets/src/scripts/components/hydrograph/index.js b/assets/src/scripts/components/hydrograph/index.js index bfc9e3156af55618a20af1c82d3934369fa35a6c..d4bdabdd342a5d016383057a0f35e14ffc0c7937 100644 --- a/assets/src/scripts/components/hydrograph/index.js +++ b/assets/src/scripts/components/hydrograph/index.js @@ -320,12 +320,12 @@ const timeSeriesGraph = function (elem) { elem.append('div') .call(link(plotSROnlyTable, createStructuredSelector({ - tsKey: () => 'compare', + tsKey: () => 'current', variable: currentVariableSelector, methods: methodsSelector, - visible: isVisibleSelector('compare'), - dataByTsID: pointsTableDataSelector('compare'), - timeSeries: currentVariableTimeSeriesSelector('compare') + visible: isVisibleSelector('current'), + dataByTsID: pointsTableDataSelector('current'), + timeSeries: currentVariableTimeSeriesSelector('current') }))); elem.append('div') .call(link(plotSROnlyTable, createStructuredSelector({ diff --git a/assets/src/scripts/components/hydrograph/index.spec.js b/assets/src/scripts/components/hydrograph/index.spec.js index c1bb727c1f11b911cd562c3030595785f91aa53d..8d8bdf2de3680b5aa0e2b2d8d5f7484fbc193c27 100644 --- a/assets/src/scripts/components/hydrograph/index.spec.js +++ b/assets/src/scripts/components/hydrograph/index.spec.js @@ -146,12 +146,18 @@ describe('Hydrograph charting module', () => { }); it('svg should be focusable', function() { - expect(svg.attr('tabindex')).toBe('0'); + expect(svg.attr('tabindex')).toBe('0'); }); it('should have an accessibility table for each time series', function() { - expect(selectAll('table.usa-sr-only').size()).toBe(3); + expect(selectAll('table.usa-sr-only').size()).toBe(3); }); + + it('should have a div for each type of time series', function() { + expect(selectAll('div#sr-only-median').size()).toBe(1); + expect(selectAll('div#sr-only-compare').size()).toBe(1); + expect(selectAll('div#sr-only-current').size()).toBe(1); + }) }); describe('SVG contains the expected elements', () => {