Closed oldrup closed 10 months ago
Hi @oldrup,
thank you for reporting! Embed Privacy relies solely on the class screen-reader-text
, which is the recommended way for such buttons. All the CSS you mentioned comes from your theme. And while the primary part with hiding it by default is correct, it seems that it’s missing defining correct colors.
But by the way: it seems to me that the WebAIM check returns a false positive, here. The button is only displayed on focus and has proper colors in this state.
So to me, it doesn’t seem to be a real issue.
Oh yeah, you are totally right. The correct colors for the :focus state are fine, and yes, WebAIM flags the "hidden" colors as having too low contrast, even though the button is completely hidden in its inactive state anyway.
I just enjoy an error-free report when possible.
Also true that the styling for the.screen-reader-text
originates from my theme. Nice catch. Will take my request elsewhere ;)
Bug/Problem
Hey! Nice plugin, thank you for sharing.
WebAIM WAVE does not like the transparent text/background of the hidden button used to trigger the overlay via keyboard and throws a contrast error:
The culprit appears to be that both the color and the background of that button, in its hidden state, is transparent
The button is hidden by other means, including clipping and positioning:
So making the colors transparent, might not be necessary at all. Unsetting styling of the button text color using this css:
Now WebAIM WAVE is happy:
Now I know, this doesn't affect the actual use of Embed Privacy with keyboard navigation and screen readers, but it's preferable not to have these false positives in a commonly used accessibility checker.
Steps to reproduce
Embed a video Run the page through https://wave.webaim.org/
Version
1.8.1
Link
https://oldrup.dk/en/more-speed-less-tracking-with-embed-privacy/
Environment info
No response
Code of Conduct