Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(VisuallyHidden): prevent causing unnecessary container scroll
  • Loading branch information
kricsleo committed Aug 31, 2025
commit e72305c2daa5d35e999c7b2c0884175efd1eb64d
7 changes: 6 additions & 1 deletion packages/core/src/VisuallyHidden/VisuallyHidden.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ withDefaults(defineProps<VisuallyHiddenProps>(), { as: 'span', feature: 'focusab
:data-hidden="feature === 'fully-hidden' ? '' : undefined"
:tabindex="feature === 'fully-hidden' ? '-1' : undefined"
:style="{
// See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
// See: https://github.com/twbs/bootstrap/blob/a360960b8dfdb4bf48f87539c2243458fa0366f7/scss/mixins/_visually-hidden.scss#L14
position: 'absolute',
border: 0,
width: '1px',
Expand All @@ -32,6 +32,11 @@ withDefaults(defineProps<VisuallyHiddenProps>(), { as: 'span', feature: 'focusab
clipPath: 'inset(50%)',
whiteSpace: 'nowrap',
wordWrap: 'normal',

// Prevent causing unnecessary container scroll
// @see https://github.com/unovue/reka-ui/issues/2127
top: '-1px',
left: '-1px',
}"
>
<slot />
Expand Down
Loading