-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
stalethis issue is more than 30 days oldthis issue is more than 30 days old
Description
Further to #823 (comment)
I have noticed that the existing u-visually-hidden mixin has an issue whereby if you tab through the content of a page and tab onto an element that has those styles, the browser scrolls to the top of the page. Presumably this is because that is effectively where the element is located (out of view) with that styling applied.
Global Forms and Global Ratings Survey have not used the mixin and instead use this technique:
clip-path: inset(50%);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
which achieves the same thing but does not have the same scroll issue upon tab.
It feels to me like we should:
- Investigate the issue I described with the current visually-hidden mixin
- Assess whether we should replace the existing mixin code with the code above
- (if and when we update the mixin) Update components that use the new technique to use
@include u-visually-hiddeninstead
For a demonstration of this issue, edit the Global Forms component Sass locally to use the mixin and generate the demo html. Then tab through the demo page until you reach the radio inputs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stalethis issue is more than 30 days oldthis issue is more than 30 days old