patternfly / patternfly-react

A set of React components for the PatternFly project.
https://react-staging.patternfly.org/
MIT License
796 stars 356 forks source link

Bug - Page - Skip to content doesn't work #11162

Closed rebeccaalpert closed 1 week ago

rebeccaalpert commented 1 week ago

Describe the problem The Page demos that include Skip to content do not actually skip to content when the button is clicked: https://www.patternfly.org/components/page/react-demos

The HTML demos seem to demonstrate this behavior, however: https://www.patternfly.org/components/page/html-demos/basic/#main-content-page-demo-basic

As does the plain component: https://www.patternfly.org/components/skip-to-content

Likely something is up with the Page component.

How do you reproduce the problem? Go to https://www.patternfly.org/components/page/react-demos/sticky-section-group/#main-content. Try to use Skip to content. You see a brief flash of focus and then the page reloads.

Expected behavior Page should focus the main section.

Is this issue blocking you? Not really. We'd like to add a skip to chatbot link in Virtual Assistant. I'd like to demonstrate it with a skip to content link, but I can't do that if this doesn't work. I can use refs for now.

What is your environment?

What is your product and what release date are you targeting? N/A

rebeccaalpert commented 1 week ago

@thatblindgeye pointed out that this is a dupe of https://github.com/patternfly/patternfly-react/issues/7554. Closing, but we should really fix #7554 rather than letting it kick around another two whole years. ⭐