-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix(accordion): disable focus on collapsed accordion item content #4320
fix(accordion): disable focus on collapsed accordion item content #4320
Conversation
Deploy preview for the-carbon-components ready! Built with commit 042e0b9 https://deploy-preview-4320--the-carbon-components.netlify.com |
@emyarod is the linked issue the right one? |
Deploy preview for carbon-elements ready! Built with commit 042e0b9 |
Is this a use-case where the |
0bf8465
to
f60e2e6
Compare
Deploy preview for carbon-components-react failed. Built with commit 0bf8465 https://app.netlify.com/sites/carbon-components-react/deploys/5da4986aebc9460007a6b666 |
sure the approach with |
Deploy preview for carbon-components-react ready! Built with commit 042e0b9 https://deploy-preview-4320--carbon-components-react.netlify.com |
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.
LGTM 👍 - Thanks @emyarod!
f60e2e6
to
32e6cec
Compare
@joshblack Would you want to answer the question from @emyarod? Thanks! |
32e6cec
to
329ecba
Compare
I think you're good as-is! Thanks @emyarod 😄 |
Closes #3429
This PR disallows accordion item content to receive focus when the panel is collapsed. This sets
display
none on accordion content when the panel is collapsed.Alternatively, we can refactor our
hidden
mixin (or each consumer of this mixin) to account for the situation where a typically visibleinput
needs to inherit a hidden visibility ruleChangelog
New
Changed
height
,visibility
, andopacity
changes withdisplay
rule change to disable focus on collapsed panel contentdiv
styles to make the injecteddiv
function like a block level element inside our custom flexbox story wrapper (refs Addon with-info wrap the story in a div withposition: relative;
storybookjs/storybook#5707)Testing / Reviewing
Add a Toggle or Checkbox to an accordion item and tab through the accordion. The toggle should not receive focus while the panel is collapsed