-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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
Add dedicated accordion component #32013
Conversation
This comment has been minimized.
This comment has been minimized.
05f306b
to
7e9b5db
Compare
Just gave this a quick check in terms of accessibility - of course, as it's based on our current one, it's all kosher. One small request though: would it be possible to ditch the latin placeholder text for some generic english text? Even if it's just something that is self explanatory, like "This is the example content for the accordion panel. It is revealed when the accordion control is activated." or similar? It's not a huge deal, but it avoids having the page all of a sudden switch to absolutely incomprehensible gibberish for screen reader users, for instance. |
10bef0e
to
8aa65a3
Compare
Fixed the remaining bugs by adding an additional |
I... think I love you? Thank you for the fixes! |
4690ced
to
15edb3e
Compare
6ed6717
to
ae85d7e
Compare
Saved a few more bytes by reordering the SVG attributes :) |
Switches to slightly more verbose, but more consistent, z-index layering we use elsewhere (e.g., pagination). Doing this ensures we're not toggling position on and off, but rather z-index.
This results in slightly better gzip compression
ec13403
to
624c959
Compare
oh, i just noticed that includes also changing the latin text. thank you, top stuff! (funnily enough, I've just written up a bug for another project that also uses lorem ipsum for their demos :) ) |
This PR replaces and adds onto #30042. The goal of this is to replace our half-baked card accordion with a fully functioning accordion component, powered by the Collapse plugin. While this adds some CSS, personally I think it makes accordions more widely accessible (e.g., fewer requirements to creating the component).
According to the origin PR by @gijsroge, this does the following:
overflow: hidden;
on the .accordion-item.accordion-flush
variant (in addition to.accordion-striped
, which may not be necessary IMO)Also from that PR, there were some remaining todos. Design and code are largely final now with my latest changes here. Looking through https://www.w3.org/TR/wai-aria-practices-1.1/#accordion, I think we're largely in order. There's also this handy dandy example accordion they provide.
Preview: https://deploy-preview-32013--twbs-bootstrap.netlify.app/docs/5.0/components/accordion/
Some open questions from me now moving this forward:
/cc @twbs/css-review