10up / component-library

A library of barebones front-end components built with WordPress and accessibility in mind.
https://baseline.10up.com/
MIT License
59 stars 12 forks source link

Focus move on accordion-label on close also #11

Open nicholasio opened 3 years ago

nicholasio commented 3 years ago

Is your feature request related to a problem? Please describe. When accordion is toggled, focus moves to accordion-label. But results focus being lost when user closes the accordion since focus moves to accordion-label which is already hidden.

Describe the solution you'd like Either check is accordion closing and not move focus. Or not move focus at all which is OK by ARIA authoring practices. They do not move focus.

Also related to issue #16.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Original Ticket: https://github.com/10up/component-accordion/issues/43