Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I style the accordion to have a space between each accordion panel? #3

Open
benedikt-buchert opened this issue Mar 24, 2020 · 4 comments

Comments

@benedikt-buchert
Copy link
Contributor

benedikt-buchert commented Mar 24, 2020

I want space each accordion panel.
For that I would need to wrap each <d> and <dt> inside a div.
Had a little read on the possible accessibility problems that this might cause: https://cdpn.io/stevef/debug/GxwaoP And it looks like this is fine.

What do you think?

Some further info:
https://www.sarasoueidan.com/blog/accordion-markup/ https://www.scottohara.me/blog/2017/10/25/accordion-release.html
https://inclusive-components.design/tabbed-interfaces/

@benedikt-buchert benedikt-buchert changed the title How do I style the accordion to have a space between each accordion panel. How do I style the accordion to have a space between each accordion panel? Mar 24, 2020
@rajasegar
Copy link
Owner

@benedikt-buchert Sounds fine to me.

@benedikt-buchert
Copy link
Contributor Author

#4
Something like this.

@rajasegar
Copy link
Owner

@benedikt-buchert The current markup with dt and dl looks outdated and having some issues with screen readers I guess. The new markup seems to be having buttons and divs. Will update the markup and give provisions for spacing. Is it ok?
https://www.w3.org/TR/wai-aria-practices-1.2/examples/accordion/accordion.html

@benedikt-buchert
Copy link
Contributor Author

benedikt-buchert commented Mar 28, 2020

Sounds good the article linked above by Sāra Soueidān gives some great options: https://www.sarasoueidan.com/blog/accordion-markup/
Also, this is quite helpful:
https://inclusive-components.design/tabbed-interfaces/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants