You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-ui-4/Overview.bs
+46-38
Original file line number
Diff line number
Diff line change
@@ -93,17 +93,17 @@ Abstract: This is a delta specification over CSS-UI Level 3.
93
93
ensuring good visibility and contrast means not using
94
94
currentColor.
95
95
96
-
<h4 id="caret-blink-time">Blinking speed of the insertion caret: 'caret-blink-time'</h4>
96
+
<h4 id="caret-animation">Animation of the insertion caret: 'caret-animation'</h4>
97
97
98
98
<pre class='propdef'>
99
-
Name: caret-blink-time
100
-
Value: auto | <<time>>{1,2}
99
+
Name: caret-animation
100
+
Value: auto | blink | none | fade
101
101
Initial: auto
102
102
Applies to: elements that accept input
103
103
Inherited: yes
104
104
Percentages: N/A
105
105
Media: interactive
106
-
Computed value: Same as specified value, except if only 1 <<time>> is specified, in which case the computed value has 2 instances of <<time>>, both with the same value as the one which was specified.
106
+
Computed value: Same as specified value.
107
107
Animatable: no
108
108
</pre>
109
109
@@ -113,42 +113,50 @@ This property allows the author
113
113
to control the speed at which it blinks,
114
114
or to turn off blinking entirely.
115
115
116
-
Issue: Do we actually need fine control over the timing,
117
-
or would "caret-blink: auto | no-blink" be enough?
118
116
119
-
When the computed value is ''caret-blink-time/auto'',
120
-
the UA determines the speed at which the cursor blinks,
121
-
if at all. It should follow platform conventions and settings.
117
+
<dl dfn-type=value dfn-for=caret-animation>
118
+
<dt><dfn>auto</dfn>
119
+
<dd>The UA determines how the caret should be animated, if at all.
120
+
It should match platform conventions,
121
+
and may be adjusted based on context.
122
122
123
-
If two <<time>> values are specified,
124
-
the caret blinks.
125
-
The first value indicates how long the caret stays on,
126
-
and the second value how long the caret stays off.
127
-
If the second value is ommitted,
128
-
it defaults to the same as the first one.
129
-
Both values must be zero or more.
123
+
Note: This is typically rendered as a blinking caret.
130
124
131
-
Note: See <a href="http://www.w3.org/TR/WCAG20/#seizure">Guideline 2.3: Seizures: Do not design content in a way that is known to cause seizures</a>[[WCAG20]].
125
+
<dt><dfn>blink</dfn>
126
+
<dd>The UA must display a blinking caret.
127
+
For accessibility reasons, and based on user preferences,
128
+
The UA may display a non animated caret instead.
132
129
133
-
If the second value is 0,
134
-
or if both values are 0,
135
-
the caret does not blink and is always on.
130
+
<dt><dfn>none</dfn>
131
+
<dd>The UA must not animate the caret.
136
132
137
-
Note: It is recommended to stop the caret from blinking using ''caret-blink-time: 0''
138
-
when applying custom animations using [[CSS3-ANIMATIONS]],
139
-
to prevent the blinking and the animation to interfere.
133
+
Note: This is only about UA driven animations of the caret.
134
+
If CSS animations are used to animate the caret color,
135
+
these should still apply normally.
140
136
141
-
If the first value is 0 and the second is not,
142
-
the caret is always off,
143
-
making it effectively invisible.
137
+
<dt><dfn>fade</dfn>
138
+
<dd>The UA must display a caret repeatedly fading in and out,
139
+
similarly to ''caret-animation/blink'' except it appears and
140
+
disappears progressively rather than suddenly.
141
+
For accessibility reasons, and based on user preferences,
142
+
The UA may display a non animated caret instead.
143
+
</dl>
144
144
145
-
<div class=example>
146
-
The following rule gives a caret that stays on for 1 second,
147
-
and off for half a second.
148
-
<pre><code class="lang-css">
149
-
input { caret-blink-time: 1s 500ms; }
150
-
</code></pre>
151
-
</div>
145
+
Issue: Do we need the accessibility escape hatch on blink and fade?
146
+
Would it be enough instead to expect the UI to put
147
+
<code>caret-animation:fixed !important</code> in the
148
+
user stylesheet when it wants to prevent the caret
149
+
from blinking?
150
+
151
+
The UA determines the speed at which the cursor blinks or fades.
152
+
It should follow platform conventions and settings.
153
+
154
+
Note: It is recommended to stop the caret from blinking or fading
155
+
using ''caret-animation: none''
156
+
when applying custom animations using [[CSS3-ANIMATIONS]],
157
+
to prevent the blinking or fading and the css animation to interfere.
158
+
159
+
Note: See <a href="http://www.w3.org/TR/WCAG20/#seizure">Guideline 2.3: Seizures: Do not design content in a way that is known to cause seizures</a>[[WCAG20]].
152
160
153
161
<div class=example>
154
162
A user who is disturbed by or has adverse reactions to blinking or flashing visuals
0 commit comments