Skip to content
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

feat(skip-link): add SkipLink component [WD-15080] #1143

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

lorumic
Copy link
Contributor

@lorumic lorumic commented Sep 30, 2024

Done

  • Added new SkipLink component, based on Vanilla p-skip--link pattern. Added tests and Storybook for it.
  • Integrated the SkipLink component inside the ApplicationLayout, so that it can be automatically obtained by React applications using the ApplicationLayout.
  • ⚠️ If you are manually adding an a element with the p-skip--link class to your React application, and are also using the ApplicationLayout component, this can be a breaking change for you.
    Please make sure that you remove your manual addition of the skip link when upgrading react-components to the version that includes this change.

QA

Storybook

To see rendered examples of all react-components, run:

yarn start

QA in your project

from react-components run:

yarn build
npm pack

Install the resulting tarball in your project with:

yarn add <path-to-tarball>

QA steps

  • Go to the SkipLink page of Storybook.
  • Click inside the container of the default example, to move the focus there.
  • Hit "Tab", and check that the "Skip to main content" link appears.

Percy steps

  • There should be a new page in Storybook, for the SkipLink component.

Fixes

Fixes: WD-15080

@webteam-app
Copy link

Copy link
Contributor

@mas-who mas-who left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly good! Just some small suggestions about the documentation and component interface :)

src/components/SkipLink/SkipLink.tsx Outdated Show resolved Hide resolved
src/components/SkipLink/SkipLink.stories.tsx Show resolved Hide resolved
Copy link
Contributor

@mas-who mas-who left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the changes :)

@lorumic lorumic merged commit b03c168 into canonical:main Oct 3, 2024
8 checks passed
@lorumic lorumic deleted the add-skip-link branch October 3, 2024 07:18
Copy link

github-actions bot commented Oct 3, 2024

🎉 This PR is included in version 1.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants