Skip to content

Commit c02e830

Browse files
committed
[CSS2] use @data-term for index generation
Using @title really isn't great from an accessibility POV
1 parent 90d963e commit c02e830

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+830
-830
lines changed

css2/about.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ <H3><span class="secno">1.4.2</span> <span id="property-defs">CSS property defin
192192

193193
<div class="propdef">
194194
<dl><dt>
195-
<span class="index-def" title="'property-name'"><dfn id="propdef-property-name" class="propdef-title" data-dfn-type="property" data-lt="property-name"><strong>'property-name'</strong></dfn></span>
195+
<span class="index-def" data-term="'property-name'"><dfn id="propdef-property-name" class="propdef-title" data-dfn-type="property" data-lt="property-name"><strong>'property-name'</strong></dfn></span>
196196
<dd>
197197
<table class="propinfo def">
198198
<tr><td><em>Value:</em>&nbsp;&nbsp;<td>legal values &amp; syntax
@@ -362,7 +362,7 @@ <h4><span class="secno">1.4.2.7</span> <span id="computed-defs">Computed value</
362362

363363
<H3><span class="secno">1.4.3</span> <span id="shorthand">Shorthand properties</span></H3>
364364

365-
<p>Some properties are <span id="x1" class="index-def" title="shorthand
365+
<p>Some properties are <span id="x1" class="index-def" data-term="shorthand
366366
property"><dfn>shorthand properties</dfn></span>, meaning that they allow
367367
authors to specify the values of several properties with a single
368368
property.

css2/about.src

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ for how this definition is used.
298298

299299
<H3><span id="shorthand">Shorthand properties</span></H3>
300300

301-
<p>Some properties are <span class="index-def" title="shorthand
301+
<p>Some properties are <span class="index-def" data-term="shorthand
302302
property"><dfn>shorthand properties</dfn></span>, meaning that they allow
303303
authors to specify the values of several properties with a single
304304
property.

css2/aural.html

Lines changed: 47 additions & 47 deletions
Large diffs are not rendered by default.

css2/aural.src

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ while
4949

5050
<p>The aural rendering of a document, already commonly used by the
5151
blind and print-impaired communities, combines speech synthesis and
52-
<span class="index-def" title="auditory icon">"auditory icons."</span> Often
52+
<span class="index-def" data-term="auditory icon">"auditory icons."</span> Often
5353
such aural presentation occurs by converting the document to plain
54-
text and feeding this to a <span class="index-def" title="screen
54+
text and feeding this to a <span class="index-def" data-term="screen
5555
reader"><dfn>screen reader</dfn></span> -- software or hardware that
5656
simply reads all the characters on the screen. This results in less
5757
effective presentation than would be the case if the document
@@ -65,7 +65,7 @@ and medical documentation systems (intranets), home entertainment, and
6565
to help users learning to read or who have difficulty reading.
6666

6767
<p>When using aural properties, the <span class="index-inst"
68-
title="canvas">canvas</span> consists of a three-dimensional physical
68+
data-term="canvas">canvas</span> consists of a three-dimensional physical
6969
space (sound surrounds) and a temporal space (one may specify sounds
7070
before, during, and after other sounds). The CSS properties also
7171
allow authors to vary the quality of synthesized speech (voice type,
@@ -96,10 +96,10 @@ paragraphs of class "peter" from the right. Paragraphs with class
9696

9797
<H3><span id="angles">Angles</span></H3>
9898
<P>Angle values are denoted by <span class="index-def"
99-
title="&lt;angle&gt;::definition of"><dfn
99+
data-term="&lt;angle&gt;::definition of"><dfn
100100
id="value-def-angle" data-dfn-type="type">&lt;angle&gt;</dfn></span> in the text.
101101
Their format is a <span class="index-inst"
102-
title="&lt;number&gt;"><span
102+
data-term="&lt;number&gt;"><span
103103
class="value-inst-number">&lt;number&gt;</span></span> immediately
104104
followed by an angle unit identifier.
105105

@@ -123,10 +123,10 @@ zero: '0deg' may be written as '0'.
123123

124124
<H3><span id="times">Times</span></H3>
125125

126-
<P>Time values are denoted by <span class="index-def" title="&lt;time&gt;::definition of"><dfn id="value-def-time" data-dfn-type="type">&lt;time&gt;</dfn></span> in the
126+
<P>Time values are denoted by <span class="index-def" data-term="&lt;time&gt;::definition of"><dfn id="value-def-time" data-dfn-type="type">&lt;time&gt;</dfn></span> in the
127127
text.
128128
Their format is a <span class="index-inst"
129-
title="&lt;number&gt;"><span
129+
data-term="&lt;number&gt;"><span
130130
class="value-inst-number">&lt;number&gt;</span></span> immediately
131131
followed by a time unit identifier.
132132

@@ -145,10 +145,10 @@ zero: '0s' may be written as '0'.
145145
<H3><span id="frequencies">Frequencies</span></H3>
146146

147147
<P>Frequency values are denoted by <span class="index-def"
148-
title="&lt;frequency&gt;::definition of"><dfn
148+
data-term="&lt;frequency&gt;::definition of"><dfn
149149
id="value-def-frequency" data-dfn-type="type">&lt;frequency&gt;</dfn></span> in the text.
150150
Their format is a <span class="index-inst"
151-
title="&lt;number&gt;"><span
151+
data-term="&lt;number&gt;"><span
152152
class="value-inst-number">&lt;number&gt;</span></span> immediately
153153
followed by a frequency unit identifier.
154154

@@ -172,7 +172,7 @@ class="propinst-volume">'volume'</span></H2>
172172

173173
<!-- #include src=properties/volume.srb -->
174174

175-
<P><span class="index-def" title="volume">Volume</span> refers to the
175+
<P><span class="index-def" data-term="volume">Volume</span> refers to the
176176
median volume of the waveform. In other words, a highly inflected
177177
voice at a volume of 50 might peak well above that. The overall values
178178
are likely to be human adjustable for comfort, for example with a
@@ -184,14 +184,14 @@ range.
184184
<P>Values have the following meanings:</p>
185185

186186
<dl>
187-
<dt><span class="index-inst" title="&lt;number&gt;"><span
187+
<dt><span class="index-inst" data-term="&lt;number&gt;"><span
188188
class="value-inst-number"><strong>&lt;number&gt;</strong>
189189
</span></span>
190190
<dd>Any number between '0' and '100'.
191191
'0' represents the <em>minimum audible</em>
192192
volume level and 100 corresponds to the
193193
<em>maximum comfortable</em> level.
194-
<dt><span class="index-inst" title="&lt;percentage&gt;"><span class="value-inst-percentage"><strong>&lt;percentage&gt;</strong></span></span>
194+
<dt><span class="index-inst" data-term="&lt;percentage&gt;"><span class="value-inst-percentage"><strong>&lt;percentage&gt;</strong></span></span>
195195
<dd>Percentage values are calculated relative to the inherited value,
196196
and are then clipped to the range '0' to '100'.
197197
<dt><strong>silent</strong>
@@ -290,9 +290,9 @@ around the cues and content rather than between them. See
290290
[[-CSS3SPEECH]] for details.
291291

292292
<dl>
293-
<dt><span class="index-inst" title="&lt;time&gt;"><span class="value-inst-time"><strong>&lt;time&gt;</strong></span></span>
293+
<dt><span class="index-inst" data-term="&lt;time&gt;"><span class="value-inst-time"><strong>&lt;time&gt;</strong></span></span>
294294
<dd>Expresses the pause in absolute time units (seconds and milliseconds).
295-
<dt><span class="index-inst" title="&lt;percentage&gt;"><span class="value-inst-percentage"><strong>&lt;percentage&gt;</strong></span></span>
295+
<dt><span class="index-inst" data-term="&lt;percentage&gt;"><span class="value-inst-percentage"><strong>&lt;percentage&gt;</strong></span></span>
296296
<dd>Refers to the inverse of the value of the
297297
<span class="propinst-speech-rate">'speech-rate'</span> property.
298298
For example, if the speech-rate is 120 words per minute
@@ -343,7 +343,7 @@ elements. Sounds may be played before and/or after the element to
343343
delimit it. Values have the following meanings:</p>
344344

345345
<dl>
346-
<dt><span class="index-inst" title="&lt;uri&gt;"><span class="value-inst-uri"><strong>&lt;uri&gt;</strong></span></span>
346+
<dt><span class="index-inst" data-term="&lt;uri&gt;"><span class="value-inst-uri"><strong>&lt;uri&gt;</strong></span></span>
347347
<dd> The URI must designate an auditory icon resource. If the URI resolves to something other than an audio file, such as an image, the resource should be ignored and the property treated as if it had the value 'none'.
348348

349349
<dt><strong>none</strong>
@@ -400,17 +400,17 @@ while an element's content is spoken.
400400
Values have the following meanings:</p>
401401

402402
<dl>
403-
<dt><span class="index-inst" title="&lt;uri&gt;"><span class="value-inst-uri"><strong>&lt;uri&gt;</strong></span></span>
403+
<dt><span class="index-inst" data-term="&lt;uri&gt;"><span class="value-inst-uri"><strong>&lt;uri&gt;</strong></span></span>
404404
<dd>The sound designated by this <span class="index-inst"
405-
title="&lt;uri&gt;"><span
405+
data-term="&lt;uri&gt;"><span
406406
class="value-inst-uri">&lt;uri&gt;</span></span> is played
407407
as a background while the element's content is spoken.
408408
<dt><strong>mix</strong>
409409
<dd>When present, this keyword means that
410410
the sound inherited from the parent element's <span
411411
class="propinst-play-during">'play-during'</span> property continues
412412
to play and the sound designated by the <span
413-
class="index-inst" title="&lt;uri&gt;"><span
413+
class="index-inst" data-term="&lt;uri&gt;"><span
414414
class="value-inst-uri">&lt;uri&gt;</span></span> is mixed with it. If
415415
'mix' is not specified, the element's background sound replaces
416416
the parent's.
@@ -459,7 +459,7 @@ hardware will become more widely available.</p>
459459
<P>Values have the following meanings:</p>
460460

461461
<dl>
462-
<dt><span class="index-inst" title="&lt;angle&gt;"><span class="value-inst-angle"><strong>&lt;angle&gt;</strong></span></span>
462+
<dt><span class="index-inst" data-term="&lt;angle&gt;"><span class="value-inst-angle"><strong>&lt;angle&gt;</strong></span></span>
463463
<dd>Position is described in terms of an angle
464464
within the range '-360deg' to '360deg'.
465465
The value '0deg' means directly ahead in the center of the sound
@@ -531,7 +531,7 @@ hemisphere values. One method is as follows:</p>
531531
<P>Values of this property have the following meanings:</p>
532532

533533
<dl>
534-
<dt><span class="index-inst" title="&lt;angle&gt;"><span class="value-inst-angle"><strong>&lt;angle&gt;</strong></span></span>
534+
<dt><span class="index-inst" data-term="&lt;angle&gt;"><span class="value-inst-angle"><strong>&lt;angle&gt;</strong></span></span>
535535
<dd>Specifies the elevation as an angle, between '-90deg' and '90deg'.
536536
'0deg' means on the forward horizon, which loosely means level with
537537
the listener. '90deg' means directly overhead and '-90deg' means directly
@@ -577,7 +577,7 @@ class="propinst-font-size">'font-size'</span>). Values have
577577
the following meanings:</p>
578578

579579
<dl>
580-
<dt><span class="index-inst" title="&lt;number&gt;"><span
580+
<dt><span class="index-inst" data-term="&lt;number&gt;"><span
581581
class="value-inst-number"><strong>&lt;number&gt;</strong></span></span>
582582
<dd>Specifies the speaking rate in words per minute, a quantity that varies
583583
somewhat by language but is nevertheless widely supported by speech
@@ -606,12 +606,12 @@ class="propinst-font-family">'font-family'</span>). Values have the
606606
following meanings:</P>
607607

608608
<dl>
609-
<dt><span class="index-def" title="&lt;generic-voice&gt;,
609+
<dt><span class="index-def" data-term="&lt;generic-voice&gt;,
610610
definition of"><dfn
611611
id="value-def-generic-voice" data-dfn-type="type"><strong>&lt;generic-voice&gt;</strong></dfn></span>
612612
<dd>Values are voice families. Possible values
613613
are 'male', 'female', and 'child'.
614-
<dt><span class="index-def" title="&lt;specific-voice&gt;::definition of"><dfn id="value-def-specific-voice" data-dfn-type="type"><strong>&lt;specific-voice&gt;</strong></dfn></span>
614+
<dt><span class="index-def" data-term="&lt;specific-voice&gt;::definition of"><dfn id="value-def-specific-voice" data-dfn-type="type"><strong>&lt;specific-voice&gt;</strong></dfn></span>
615615
<dd>Values are specific instances (e.g., comedian, trinoids, carlos, lani).
616616
</dl>
617617

@@ -644,7 +644,7 @@ but for a female voice, it's around 210Hz.</p>
644644
<P>Values have the following meanings:</P>
645645

646646
<dl>
647-
<dt><span class="index-inst" title="&lt;frequency&gt;"><span class="value-inst-frequency"><strong>&lt;frequency&gt;</strong></span></span>
647+
<dt><span class="index-inst" data-term="&lt;frequency&gt;"><span class="value-inst-frequency"><strong>&lt;frequency&gt;</strong></span></span>
648648
<dd>Specifies the average pitch of the speaking voice in hertz (Hz).
649649
<dt><strong>x-low</strong>, <strong>low</strong>,
650650
<strong>medium</strong>, <strong>high</strong>, <strong>x-high</strong>
@@ -671,7 +671,7 @@ from the average pitch.
671671
<P>Values have the following meanings:</p>
672672

673673
<dl>
674-
<dt><span class="index-inst" title="&lt;number&gt;"><span class="value-inst-number"><strong>&lt;number&gt;</strong></span></span>
674+
<dt><span class="index-inst" data-term="&lt;number&gt;"><span class="value-inst-number"><strong>&lt;number&gt;</strong></span></span>
675675
<dd>A value between '0' and '100'. A pitch range of '0' produces
676676
a flat, monotonic voice. A pitch range of 50 produces normal
677677
inflection. Pitch ranges greater than 50 produce animated voices.
@@ -693,7 +693,7 @@ provided to allow developers to exploit higher-end auditory displays.
693693
<P>Values have the following meanings:</p>
694694

695695
<dl>
696-
<dt><span class="index-inst" title="&lt;number&gt;"><span class="value-inst-number"><strong>&lt;number&gt;</strong></span></span>
696+
<dt><span class="index-inst" data-term="&lt;number&gt;"><span class="value-inst-number"><strong>&lt;number&gt;</strong></span></span>
697697
<dd>A value, between '0' and '100'. The meaning of values
698698
depends on the language being spoken. For example,
699699
a level of '50' for a
@@ -711,7 +711,7 @@ rich voice will "carry" in a large room, a smooth voice will not.
711711
<P>Values have the following meanings:</p>
712712

713713
<dl>
714-
<dt><span class="index-inst" title="&lt;number&gt;"><span class="value-inst-number"><strong>&lt;number&gt;</strong></span></span>
714+
<dt><span class="index-inst" data-term="&lt;number&gt;"><span class="value-inst-number"><strong>&lt;number&gt;</strong></span></span>
715715
<dd>A value between '0' and '100'.
716716
The higher the value, the more the voice will carry.
717717
A lower value will produce a soft, mellifluous voice.

css2/bin/addianch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ while ($buf =~ /$defp/sio) {
5555
$content = $3;
5656
$elem = $&;
5757

58-
# Check if there is a title attribute, otherwise use content
59-
if ($stag =~ /title\s*=\s*(?:\"([^\"]*)\"|\'([^\']*)\'|([^\s>]*))/sio) {
58+
# Check if there is a data-term attribute, otherwise use content
59+
if ($stag =~ /data-term\s*=\s*(?:\"([^\"]*)\"|\'([^\']*)\'|([^\s>]*))/sio) {
6060
$entry = $1.$2.$3; # Only one of the three is non-empty
6161
} else {
6262
$entry = $content; # Assume content is index term

css2/bin/pextr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ print output "<dl><dt>\n";
6060
@names = split(/[, \t\n]+/, $name);
6161
$comma = "";
6262
foreach $n (@names) {
63-
print output "$comma<span class=\"index-def\" title=\"'$n'\"><dfn id=\"propdef-$n\" class=\"propdef-title\" data-dfn-type=\"property\" data-lt=\"$n\"><strong>'$n'</strong></dfn></span>";
63+
print output "$comma<span class=\"index-def\" data-term=\"'$n'\"><dfn id=\"propdef-$n\" class=\"propdef-title\" data-dfn-type=\"property\" data-lt=\"$n\"><strong>'$n'</strong></dfn></span>";
6464
$comma = ", ";
6565
}
6666
print output "\n<dd>\n";

0 commit comments

Comments
 (0)