Skip to content

[css-content] Clarify how 'content' alt should work if images fail to load or are disabled #218

@zcorpan

Description

@zcorpan

https://drafts.csswg.org/css-content/#alt

It says this string is only for AT.

In the example:

.new::before {
  content: url(./img/star.png) / "New!";
    /* or a localized attribute from the DOM: attr("data-alt") */
}

if the image fails to load or the UA has images disabled, what should be rendered visually? Nothing? A broken image icon? The alt string?

cc @fantasai

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions