-
Notifications
You must be signed in to change notification settings - Fork 673
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
(components): Render extra Embed props on iframe tag #1122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it.
Okay, one thing that's left before releasing this is updating the changelog. This could be breaking, right? |
The types for Embed also change, since it no longer supports box props (space, color, variant). theme-ui/packages/components/index.d.ts Lines 293 to 330 in a747d60
I think we can get rid of space and color props, but pass variant to the root child. |
Hmm... maybe we could still spread on Box, but pick a greater set of iframe props to pass on to the child iframe? |
Yep, I realize I've forgotten to update the changelog with several recent PRs (like print color mode support). I will add that. Sounds good with |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/systemui/theme-ui/g0bix1sqf |
This actually wasn't quite ready to merge after our discussion @hasparus—we can use prop filtering to make using space props keep working here without a breaking change, but that can be a separate PR before we release stable |
Closes #966, this PR makes extra props on the
Embed
component, especially/such astitle
oraria-label
, be rendered on theiframe
tag instead of the container div, to allow better accessibility when using that component.This is a very slightly potentially breaking change for developers who are using container style props (
mb={3}
) directly onEmbed
, since those could now behave differently inside another div, but I don’t think that’s a common usage. Added a quick note about accessibility to theEmbed
docs as well.Includes tests, snapshots, & docs.