-
Notifications
You must be signed in to change notification settings - Fork 538
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
refactor(VisuallyHidden): update base element from div to span #4691
Conversation
🦋 Changeset detectedLatest commit: eaa9b66 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
size-limit report 📦
|
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.
LGTM!
Do you suspect any layout related changes for siblings when moving from a block element to span element?
@siddharthkp I'm not sure honestly 🤷 curious what you all think. Since this is hidden and position: absolute I would assume that it's not participating in layouts but I am very aware of the fact that I could be missing a scenario where that is true 😅 |
Update our internal utility
VisuallyHidden
to use a<span>
by default over a<div>
. This is due to the fact that a<div>
is not allowable in all contexts, for example a<div>
cannot be rendered within a<p>
. As a result, this helper may not work as intended if a component is within a specific context. Moving over to aspan
by default will help with this as it it allowed in all contexts (hopefully).Changelog
New
Changed
div
tospan
forVisuallyHidden
span
inas
Removed
Rollout strategy