3 ms·
> Bad for SEO > Bad for Accessibility Good. I don't want my background images/textures to be indexed by search engines or shown to people with visual impairme
by kijin 7y ago
> Bad for SEO
> Bad for Accessibility
Good. I don't want my background images/textures to be indexed by search engines or shown to people with visual impairment. It's purely for presentation, and should be ignored by applications that only care about the content.
In fact, 95% of images on a typical web page these days seem to be ads, logos, and cute little buttons that have nothing to do with the content. Which means CSS background-image is perfectly fine for most of these images.
- dymk 7y agoScreen readers and search engine indexers care about both presentation and content.
- mikeg8 7y agoThey do not care about visual/aesthetic presentation such as gradients, shadows, textures etc, aruagbly the most common and appropriate use of background image. They care about structural presentation.
- jszymborski 7y ago"...or shown to people with visual impairment" It's not about being shown to people with visual impairment. It's so that images that you felt relevant to convey to your sighted audience can also be conveyed to your visually impaired audience. Buttons and logo have text that need to be conveyed. Figures important to a text need description. People who build software get a bad rap for building inaccessible apps, and this line of thinking is why.
- burgerboy 7y agoYou are the problem with accessibility. Please actually read about what types of images you actually need to show. Showing images unrelated to the content, such as background images, are actually harmful to impaired users as it clutters the information.
- hn_throwaway_99 7y ago> It's so that images that you felt relevant to convey to your sighted audience can also be conveyed to your visually impaired audience. Completely disagree. When used correctly, while background-image is an enhancement for sighted viewers, it's actually a distraction for visually impaired viewers where a screen reader needs to read the information sequentially. Again, printing (where CSS background-images aren't shown by default) is a good test. If the printed page is still understandable, and actually easier to read on paper, without the background-image, it's probably a good use of the feature. If critical info is missing (stuff that would also be left out by a screen reader), it's a bad use of background-image.
- jszymborski 7y agoThe point made earlier is that most images are "buttons and logos", and while not part of the main text, understanding what they say is important to e.g. the navigation or context of the site. For that reason, it's no more clutter for users of screen readers than it is visual users. The "printing a page" example doesn't work, because we still need to navigate pages, see logos, etc.
- jarfil 7y agoThe problem lies in people using background-image as the background of fluid design elements where it acts as an illustration with semantic content. Otherwise, it's OK to use as a decorative background. In the case of buttons, it might or might not make sense, depending on each use. I think the problem is frameworks shoving it all in the same place because "an image is an image is an image", which they shouldn't be doing.