-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
…nteraction with semantics. #3775
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -423,6 +423,10 @@ Text Processing</h3> | |
It has no effect on the underlying content, | ||
and must not affect the content of a plain text copy & paste operation. | ||
|
||
Note: The 'text-transform' property only affects the presentation layer; | ||
correct casing for semantic purposes is expected to be encoded | ||
in the source text. | ||
|
||
<wpt> | ||
text-transform/text-transform-copy-paste-001-manual.html | ||
</wpt> | ||
|
@@ -558,6 +562,53 @@ Text Processing</h3> | |
<pre>abbr:lang(ja) { text-transform: full-width; }</pre> | ||
</div> | ||
|
||
Note: The purpose of 'text-transform' is | ||
to allow for presentational casing transformations | ||
without affecting the semantics of the document. | ||
Note in particular that 'text-transform' casing operations are lossy, | ||
and can distort the meaning of a text. | ||
While accessiblity interfaces may wish to convey | ||
the apparent casing of the rendered text, | ||
the transformed text cannot be relied on accurately represent | ||
This comment has been minimized.
Sorry, something went wrong. |
||
the underlying meaning of the document. | ||
This comment has been minimized.
Sorry, something went wrong.
bkardell
Contributor
|
||
|
||
<div class="example"> | ||
In this example, | ||
the first line of text is capitalized as a visual effect. | ||
|
||
<pre highlight=css> | ||
section > p:first-of-type::first-line { | ||
text-transform: uppercase; | ||
} | ||
</pre> | ||
|
||
This effect cannot be written into the source document | ||
because the position of the line break depends on layout. | ||
But also, the capitalization is not reflecting a semantic distinction | ||
and is not intended to affect the paragraph’s reading; | ||
therefore it belongs in the presentation layer. | ||
</div> | ||
|
||
<div class="example"> | ||
In this example, | ||
the [=ruby=] annotations, | ||
which are half the size of the main paragraph text, | ||
are transformed to use regular-size kana | ||
in place of [=small kana=]. | ||
|
||
<pre highlight=css> | ||
rt { font-size: 50%; text-transform: full-size-kana; } | ||
:is(h1, h2, h3, h4) rt { text-transform: none; /* unset for large text*/ } | ||
</pre> | ||
|
||
Note that while this makes such letters easier to see at small type sizes, | ||
the transformation distorts the text: | ||
the reader needs to mentally substitute [=small kana=] | ||
in the appropriate places-- | ||
not unlike reading a text in English | ||
with all “s” characters substituted by “f”. | ||
This comment has been minimized.
Sorry, something went wrong.
acli
|
||
</div> | ||
|
||
<p class="note"> | ||
Note: As defined in <a href="#order">Text Processing Order of Operations</a>, | ||
transforming text affects line-breaking and other formatting operations. | ||
|
Missing a world here I think.. "[to] accurately represent"?