Are inline style bad for screen readers?
-
25-09-2019 - |
문제
Example
<span style="BACKGROUND-COLOR: #ffd700">Background color</span>
How screen reader handle inline css ? is there any other cons of inline CSS except css management?
Inline styles are valid also . i tested with W3C Validator and with XHTML 1.0 Strict doctype?
<p><span style="MARGIN-RIGHT: 0px">Left indent</span></p>
해결책
How screen reader handle inline css ?
Same as any other CSS.
is there any other cons of inline CSS except css management?
Just bandwidth related costs.
다른 팁
Inline styles are hard to manage and to override. And if you set colors and borders they may override your print stylesheet. I have seen yellow links in print previews … clearly not the author’s intention but a very bad user experience.
Screenreaders honor only the display
property, the don’t speak elements with display:none
. It doesn’t matter where you declare it.
inline css isnt bad for screen readers. just its not so useful/
but if you want give style in additional ways/ use this if you can;
div.blabla p span{margin-right: 0px;}
or give that style with jquery/
$("div#blabla").css("display","none");