Closed Bug 20035 Opened 25 years ago Closed 25 years ago

With the 'content' property, URI of unsupported or missing resources is displayed

Categories

(Core :: CSS Parsing and Computation, defect, P3)

x86
Windows 98
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: karl, Assigned: pierre)

References

()

Details

Mozilla currently supports generated content using the content property with a
URL() value. According to CSS 2, "If a user agent cannot support the resource
because of the media types it supports, it must ignore the resource."

This doesn’t happen in Mozilla. If the resource type isn’t supported or the
resource is missing, the resource’s URI is displayed instead.

You can see an example of this at
<URL:http://home.sol.no/~huftis/mozilla/content.html>.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
The resource shouldn't be ignored because there is no mention of a particular
media type in this page. If you write the following, the resource will be ignored
because the media is not recognized:
  @media unknownmedia {
    P.missing:before { content: url("notfound.jpg"); color: green; }
  }

We are just in the case of a missing resource and CSS2 says in
http://www.w3.org/TR/REC-CSS2/syndata.html#x48 that "User agents may vary in how
they handle URIs that designate unavailable or inapplicable resources". For a
missing image, we display the file name without the extension.

According to HTML4, http://www.w3.org/TR/REC-html40/struct/objects.html#edef-IMG,
"User agents must render alternate text when they cannot support images, they
cannot support a certain image type or when they are configured not to display
images".

The paragraph on http://www.w3.org/TR/REC-html40/struct/objects.html#adef-alt
says that the alt attribute must be specified for the IMG elements, which means
that some text will always be displayed if the image can't be found.

The reason for requiring the 'alt' text in HTML4 is "to avoid problems with text-
only UAs as well as to make image content understandable and navigable to users
of non-visual UAs". Result: our decision to display a default 'alt' text will
only be noticed by page designers who don't follow the standard.

Closing as invalid.
I forgot to add that our decision was intended to and will certainly be
appreciated by the "users of non-visual UAs" (the latest PC-techno-speak for
"blind", I guess).
Status: RESOLVED → VERIFIED
Verified invalid
You need to log in before you can comment on or make changes to this bug.