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(button): add href for Link Variant #2814

Merged
merged 12 commits into from
Aug 18, 2024

Conversation

tejas161
Copy link
Contributor

What I did

  1. Created new attribute href for pf-button Link.
  2. Created new attribute target for pf-button Link.
  3. Updated docs for pf-button Link showing examples how to pass an href with target = "_blank" or target = "_self".

Testing Instructions

  1. Check if pf-button "link" variant properly redirects to the link passed via href attribute.
  2. Check the Accessibility of pf-button Link.

Closes: #2769

Copy link

changeset-bot bot commented Jul 21, 2024

🦋 Changeset detected

Latest commit: 1452d1e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@patternfly/elements Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Aug 16, 2024

✅ Commitlint tests passed!

More Info
{
  "valid": true,
  "errors": [],
  "warnings": [],
  "input": "feat(button): add href for Link Variant"
}

Copy link
Member

@bennypowers bennypowers left a comment

Choose a reason for hiding this comment

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

@adamjohnson can you take a look at this for usability?

Copy link

netlify bot commented Aug 16, 2024

Deploy Preview for patternfly-elements ready!

Name Link
🔨 Latest commit 1452d1e
🔍 Latest deploy log https://app.netlify.com/sites/patternfly-elements/deploys/66c1de197f12df0008223ae8
😎 Deploy Preview https://deploy-preview-2814--patternfly-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@zeroedin zeroedin left a comment

Choose a reason for hiding this comment

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

@bennypowers seems like you can click around the href variant and not actually follow the link. The click box for the <a> doesn't appear to cover the whole element clickable area.

@adamjohnson
Copy link
Collaborator

If you try to tab to "Link" and "Go to PatternFly" in the Link Variant demo, they get skipped and are not focusable.

It looks like removing tabindex="-1" from the host resolves this issue.

@bennypowers bennypowers merged commit 587d957 into patternfly:main Aug 18, 2024
9 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<pf-button variant="link">: how to add href to element.
4 participants