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

Add a slot to p-divider for a centered item with space around. #1037

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

collincchoy
Copy link
Contributor

image

Copy link

netlify bot commented Dec 7, 2023

Deploy Preview for prefect-design ready!

Name Link
🔨 Latest commit 6cb4235
🔍 Latest deploy log https://app.netlify.com/sites/prefect-design/deploys/65720aa2d38eda00089818b0
😎 Deploy Preview https://deploy-preview-1037--prefect-design.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
Contributor

@brandonreid brandonreid left a comment

Choose a reason for hiding this comment

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

Without doing any work to find out, I wonder if there are any accessibility considerations to be had around two <hr> elements divided by something? I think it's a good call to include this in the divider pattern though, since we actually do this in a number of places.

@collincchoy
Copy link
Contributor Author

collincchoy commented Dec 7, 2023

Without doing any work to find out, I wonder if there are any accessibility considerations to be had around two <hr> elements divided by something? I think it's a good call to include this in the divider pattern though, since we actually do this in a number of places.

it's a good thought. my prior implementation was more "1 line (from a border)" + "some content" with the 2 positioned on top of one another. which i've seen (anecdotally) as common in other implementations. also saw 1 impl w/ an aria-hidden on the line element but... I'm not really sure why that'd be helpful to a sr..

Worth noting I altered to this approach because the other one relies on overlaying with a non-transparent background behind the slotted content to cover up the line. Setting that background out-of-the-box becomes the tricky part tho and forcing the consumer to deal with that seems not great.

def curious if there's some weirdness w/ this some-where/how.

@pleek91
Copy link
Collaborator

pleek91 commented Dec 8, 2023

Merging this since I'm about to do a release. Think we all agree on the implementation.

@pleek91 pleek91 merged commit 2bb4b2a into main Dec 8, 2023
5 checks passed
@pleek91 pleek91 deleted the add-divider-slot branch December 8, 2023 16:09
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.

3 participants