diff --git a/app/assets/javascripts/radioSelect.js b/app/assets/javascripts/radioSelect.js index fbd4175b9..53c8d7f37 100644 --- a/app/assets/javascripts/radioSelect.js +++ b/app/assets/javascripts/radioSelect.js @@ -17,7 +17,7 @@ {{/showNowAsDefault}}
{{#categories}} - + {{/categories}}
`), @@ -37,7 +37,7 @@ {{/choices}} - + `), 'chosen': Hogan.compile(` @@ -58,7 +58,7 @@ {{/choices}}
- +
`) }; diff --git a/tests/javascripts/radioSelect.test.js b/tests/javascripts/radioSelect.test.js index 4ab998df1..ab5420e07 100644 --- a/tests/javascripts/radioSelect.test.js +++ b/tests/javascripts/radioSelect.test.js @@ -179,6 +179,14 @@ describe('RadioSelect', () => { }); + test("each button's semantics should show it controls another region and that region is collapsed", () => { + + categoryButtons.forEach(btn => { + expect(btn.getAttribute('aria-expanded')).toEqual('false'); + }); + + }); + }); }); @@ -241,6 +249,7 @@ describe('RadioSelect', () => { expect(button).not.toBeNull(); expect(button.getAttribute('value')).toEqual('Done'); + expect(button.getAttribute('aria-expanded')).toEqual('true'); });