-
Notifications
You must be signed in to change notification settings - Fork 46
feat: render accordions via details markup #8606
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
base: release/3
Are you sure you want to change the base?
Conversation
|
Netlify Draft Deployment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
kolibri/packages/components/src/functional-components/Collapsible/collapsible.scss
Lines 21 to 33 in 239f485
| &__wrapper { | |
| /* Forces the element into its own GPU compositing layer (via 3D transform). Helps prevent rendering/layout bugs (e.g. #7511) and may improve animation performance. */ | |
| transform: translateZ(0); | |
| display: grid; | |
| /** | |
| * The `overflow: hidden` ensures that the content is not visible during the animated | |
| * opening and closing. This should also cut off overlays containing content, but it | |
| *does not. | |
| */ | |
| overflow: hidden; | |
| grid-template-rows: 0fr; | |
| transition: grid-template-rows 0.3s; | |
| } |
<details>
After switching the collapsible container from a div to a <details> element, the user-agent now applies details:not([open]) > :not(summary) and details[open] > :not(summary) rules that set display: none/block with higher specificity than the .collapsible__wrapper { display: grid; … } declaration. This causes the wrapper to always render as display: block, so the grid-template-rows transition never runs and the accordion/details content opens and closes abruptly with no animation. Overriding the UA rule with a more specific selector (e.g. details.collapsible > .collapsible__wrapper) or !important is required to keep the grid-based animation working.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
…ibility and structure - Enhanced accordion and details components to use semantic HTML elements like <details> and <summary>. - Updated test cases to reflect changes in button roles and labels for better accessibility. - Refactored styles for consistency and improved layout. - Adjusted event handling to ensure proper functionality when components are enabled or disabled.
6ff7215 to
c99821c
Compare
Summary
markup and icon/label slots
Testing
https://chatgpt.com/codex/tasks/task_e_68dd922d4280832ba03b2474afe54f0f