Skip to content

Conversation

siddharthkp
Copy link
Member

@siddharthkp siddharthkp commented Nov 15, 2023

From A more readable GitHub,

Links embedded in text are most perceivable when they have distinct styling. Sufficient contrast with the surrounding text is good, but should not be used as the only method of visually distinguishing a link from other text content.

To remediate the problem we have implemented a new accessibility setting with two options: show or hide link underlines in text blocks. Those who need or prefer stylistic differentiation can now choose to enable them. The default is to underline links.

This PR implements the short term strategy from https://github.com/github/primer/discussions/2836#discussioncomment-7533878

Note: inline=true overrides underline=false and adds an underline

Story with all combinations: https://primer-091e4ade04-13348165.drafts.github.io/storybook/?path=/story/components-link-features--inline

Copy link

changeset-bot bot commented Nov 15, 2023

🦋 Changeset detected

Latest commit: 8bb69b7

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

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

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

@siddharthkp siddharthkp added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Nov 15, 2023
Copy link
Contributor

github-actions bot commented Nov 15, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 104.3 KB (+0.05% 🔺)
dist/browser.umd.js 104.84 KB (+0.05% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-3946 November 15, 2023 16:36 Inactive
@siddharthkp siddharthkp added update snapshots 🤖 Command that updates VRT snapshots on the pull request and removed update snapshots 🤖 Command that updates VRT snapshots on the pull request labels Nov 16, 2023
@github-actions github-actions bot temporarily deployed to storybook-preview-3946 November 16, 2023 13:35 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3946 November 16, 2023 13:39 Inactive
@siddharthkp siddharthkp marked this pull request as ready for review November 16, 2023 15:10
@siddharthkp siddharthkp requested review from a team and joshblack November 16, 2023 15:10
Copy link
Member

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

Looks great! Just had a comment for the story and also wanted to ask if this should be added to the Link.docs.json as well for the site?

</Link>
)

export const Inline = () => (
Copy link
Member

Choose a reason for hiding this comment

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

This seems like a good candidate for a dev story, similar to what we have for button (I think?). What would you think of having the example in the feature here be a link in a text block and this would be its own dev story?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, done!

@github-actions github-actions bot temporarily deployed to storybook-preview-3946 November 20, 2023 14:06 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3946 November 20, 2023 14:06 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3946 November 20, 2023 14:14 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3946 November 20, 2023 14:16 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

update snapshots 🤖 Command that updates VRT snapshots on the pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants