-
Notifications
You must be signed in to change notification settings - Fork 376
chore(docs): Add onClick to SkipToContent in demos #11297
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
Conversation
SkipToContent does not work in the context of the PatternFly page. Using document.getElementById sidesteps this issue and allows them to work as usual. I tried using refs, but because Page is an older class component, the refs were not compatible. We'd likely need to rewrite page as a function component. This is good enough for now, in my opinion. SkipToContentBasic works as advertised, so I am not touching that, and I also did not touch react-integration or unit tests.
|
Preview: https://patternfly-react-pr-11297.surge.sh A11y report: https://patternfly-react-pr-11297-a11y.surge.sh |
thatblindgeye
left a comment
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.
Can we update the SkipToContent example as well?
Use refs in demo to match other demos.
|
Pushed an update to the skip to content so it uses an onClick. I wrapped the content in a |
* chore(docs): Add onClick to SkipToContent in demos SkipToContent does not work in the context of the PatternFly page. Using document.getElementById sidesteps this issue and allows them to work as usual. I tried using refs, but because Page is an older class component, the refs were not compatible. We'd likely need to rewrite page as a function component. This is good enough for now, in my opinion. SkipToContentBasic works as advertised, so I am not touching that, and I also did not touch react-integration or unit tests. * chore(SkipToContent): Update demo Use refs in demo to match other demos.
SkipToContent does not work in the context of the PatternFly page. Using document.getElementById sidesteps this issue and allows them to work as usual. I tried using refs, but because Page is an older class component, the refs were not compatible. We'd likely need to rewrite page as a function component. I'm not able to accomplish this in the short time before the end of the year. This is good enough for now, in my opinion.
SkipToContentBasic works as advertised, so I am not touching that, and I also did not touch react-integration or unit tests.
What: Closes #7554