-
Notifications
You must be signed in to change notification settings - Fork 1
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
Focus on TOC when TOC is opened #2102
Conversation
d363166
to
1838b76
Compare
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.
Looks good, I think the spec failure is flaky, I reran it and hopefully it passes 🤞
9807e98
to
ba4c792
Compare
a5eab91
to
41d80f7
Compare
a48544e
to
2c7c787
Compare
@RoyEJohnson I merged a related card and this now has conflicts to be resolved |
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.
i pushed a commit fixing the test for transitionend and coverage, looks good otherwise
}); | ||
reactDomAct(() => { | ||
sb?.dispatchEvent(new Event('transitionend')); | ||
}); |
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.
the trick was that the event listener isn't added until the thing re-renders with the open prop, so you need to have the event dispatch in a separate act call after you update the open state
For: openstax/unified#2711 Also added an aria-label to HighlightsHelpInfo close button Update index.spec.tsx Delay setting focus Add space after comma in css
53d42e9
to
70ae22b
Compare
For: https://github.com/openstax/unified/issues/2711
Also added an aria-label to HighlightsHelpInfo close button