From 2600e6a1262874ada43fa1c1eb240502ccfad242 Mon Sep 17 00:00:00 2001 From: Daniil Sakhapov Date: Fri, 11 Jul 2025 16:17:27 +0200 Subject: [PATCH] Add an example explaining how to use counters in alt text Explain how to set up a fallback when using counter in alt text in unsupported browsers. Requested in I2S process: https://groups.google.com/a/chromium.org/g/blink-dev/c/Ec36bxU5lok/m/5ljOQJS6BQAJ --- css-content-3/Overview.bs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/css-content-3/Overview.bs b/css-content-3/Overview.bs index cc4f7aa8915..9f97908d2da 100644 --- a/css-content-3/Overview.bs +++ b/css-content-3/Overview.bs @@ -210,6 +210,19 @@ Inserting and Replacing Content: the 'content' property the element has no "alt text". +
+ To correctly use <> in "alt text" in unsupported browsers + one should specify 'content' property twice. + First, a fallback without counter in "alt text". + Second, use counter in "alt text". +
+			::before {
+				content: "Chapter" counter(chapter);
+				content: "Chapter" counter(chapter) / "Chapter" counter(chapter);
+			}
+		
+
+ Issue: Should the contents keyword be replaced with ''content()''?

@@ -1397,4 +1410,4 @@ No new privacy considerations have been reported on this specification.

Security Considerations

-No new security considerations have been reported on this specification. \ No newline at end of file +No new security considerations have been reported on this specification.