Replies: 2 comments 2 replies
-
Hey! Our implementation is based on what Bootstrap does: Historically Bootstrap has always been a much bigger project with many more users, so because of the complexity of this problem we've always just leaned on their solution, trusting that it's being battle tested by many more people and that any issues will be discovered. Do you have an updated implementation you want to propose along with how it compares in testing? |
Beta Was this translation helpful? Give feedback.
-
Why not go with what WordPress does, they have a gigantic install base? See: https://make.wordpress.org/accessibility/handbook/markup/the-css-class-screen-reader-text/ The explanation of the properties is interesting:
/* Text meant only for screen readers. */
.screen-reader-text {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
word-wrap: normal !important;
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I was wondering if we need to consider updating the
sr-only
utility class, which looks like this at the moment:According to the discussion here: h5bp/main.css#12, it seems negative margins can cause some issues with VoiceOver.
It also seems
clip
is deprecated now: https://drafts.fxtf.org/css-masking-1/#clip-property? Given that legacy browsers are no longer supported as of v2.0, maybe we can remove it and useclip-path
instead? Or keepclip
and also addclip-path
?I'm genuinely curious and would love to hear some thoughts on this!
Beta Was this translation helpful? Give feedback.
All reactions