Fix keyboard inaccessible accordion in guild/party page fixes #12653 (#12656)

* fix: replace clickable div with button

improve accessibility for keyboard users

* refactor: extract sidebar button to own component

* refactor: button to div

* fix: lint, update sidebarSection test
This commit is contained in:
J Sanderson
2020-10-26 14:41:40 +00:00
committed by GitHub
parent 625b4a4ad7
commit e39d3e52e2
3 changed files with 68 additions and 26 deletions
@@ -32,9 +32,9 @@ describe('Sidebar Section', () => {
it('hides contents', () => {
expect(wrapper.find('.section-body').element.style.display).to.not.eq('none');
wrapper.find('.section-toggle').trigger('click');
wrapper.find('[role="button"').trigger('click');
expect(wrapper.find('.section-body').element.style.display).to.eq('none');
wrapper.find('.section-toggle').trigger('click');
wrapper.find('[role="button"').trigger('click');
expect(wrapper.find('.section-body').element.style.display).to.not.eq('none');
});