-
Notifications
You must be signed in to change notification settings - Fork 19
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
Improve .screen-reader-text #10
Conversation
Bulletproofing this utility class: * prevents border to appear, if any; * progressively enhance the clip thing: `clip` [is deprecated](https://www.w3.org/TR/css-masking-1/#clip-property) and @ryuran [suggested the sorter possible version](https://twitter.com/ryuran78/status/778943389819604992) for `clip-path`; * [J. Renée Beach warned about the single pixel width having side effects on text rendering and therefore on its vocalisation by screen readers](https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe#.vcd5xlpgg). It's been widely tested [on this codepend](http://codepen.io/ffoodd/pen/gwKZyq?editors=1100#) and [proofread then translated on Hugo Giraudel's blog](http://hugogiraudel.com/2016/10/13/css-hide-and-seek/). Please let me know if you find any issue related to this :) And thanks a lot for those patterns, they're great <3
@ffoodd Thanks for your PR. |
@ffoodd thanks, very appreciated. Yep I'd also say this pattern should be improved a bit. However, there are some differences in what is actually used in the WordPress Core and what is used by bundled themes instead. Seems like themes have a shorter version of the Core:
Twenty Seventeen:
I'm not sure why themes should use a different class. Though WordPress uses an old syntax for the About the single points: border clip-path Also, I'm not sure about the combined effect of single pixel width What it's not mentioned in that post is that, by default, words don't break and spaces are not stripped out, even if you use I see there was some investigation but seems they missed to identify the real reason why words were smushed together. On WordPress, that happened because some elements use The solution introduced in core is I'd recommend to give the Trac ticket a read, for more details, see https://core.trac.wordpress.org/ticket/31962 So I'm not sure Lastly
|
P.S. |
Very interesting answer, thanks! I didn't know about the inherited
That should probably be tested in WordPress itself. I'll add Thanks for reading, I'm still learning :) |
Adding `margin` and `padding`.
As another source on the I don't know if there is any difference between those two declarations — but since WordPress already solved this using Any thought? |
Interesting discussion on the Drupal issue. I'd lean towards keeping it consistent with what Core does and use |
Discussed in today's a11y meeting, decided to merge this and open a new issue to modernize the class, taking into account end of support for IE 8-9-10 announced for WordPress 4.8. See
|
Bulletproofing this utility class:
clip
is deprecated and @ryuran suggested the sorter possible version forclip-path
;It's been widely tested on this codepend and proofread then translated on Hugo Giraudel's blog.
Please let me know if you find any issue related to this :)
And thanks a lot for those patterns, they're great <3