Skip to content

Commit b0db71c

Browse files
committed
MINOR: refactor abbr
1 parent 11e5f55 commit b0db71c

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

html/forms/form-validation/full-example.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<form>
3939
<p>
4040
<fieldset>
41-
<legend>Do you have a driver's license?<abbr title="This field is mandatory" aria-label="required">*</abbr></legend>
41+
<legend>Do you have a driver's license?<spanaria-label="required">*</span></legend>
4242
<!-- While only one radio button in a same-named group can be selected at a time,
4343
and therefore only one radio button in a same-named group having the "required"
4444
attribute suffices in making a selection a requirement -->
@@ -57,7 +57,7 @@
5757
pattern="\d+">
5858
</p>
5959
<p>
60-
<label for="t1">What's your favorite fruit?<abbr title="This field is mandatory" aria-label="required">*</abbr></label>
60+
<label for="t1">What's your favorite fruit?<span aria-label="required">*</span></label>
6161
<input type="text" id="t1" name="fruit" list="l1" required
6262
pattern="[Bb]anana|[Cc]herry|[Aa]pple|[Ss]trawberry|[Ll]emon|[Oo]range">
6363
<datalist id="l1">

html/forms/html-form-structure/payment-form.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<body>
1111
<form method="post">
1212
<h1>Payment form</h1>
13-
<p>Required fields are followed by <strong><abbr title="required">*</abbr></strong>.</p>
13+
<p>Required fields are followed by <strong><span aia-label="required">*</span></strong>.</p>
1414
<section>
1515
<h2>Contact information</h2>
1616
<fieldset>
@@ -39,21 +39,21 @@ <h2>Contact information</h2>
3939
<p>
4040
<label for="name">
4141
<span>Name: </span>
42-
<strong><abbr title="required">*</abbr></strong>
42+
<strong><span aria-label="required">*</span></strong>
4343
</label>
4444
<input type="text" id="name" name="username">
4545
</p>
4646
<p>
4747
<label for="mail">
4848
<span>E-mail: </span>
49-
<strong><abbr title="required">*</abbr></strong>
49+
<strong><span aria-label="required">*</span></strong>
5050
</label>
5151
<input type="email" id="mail" name="usermail">
5252
</p>
5353
<p>
5454
<label for="pwd">
5555
<span>Password: </span>
56-
<strong><abbr title="required">*</abbr></strong>
56+
<strong><span aria-label="required">*</span></strong>
5757
</label>
5858
<input type="password" id="pwd" name="password">
5959
</p>
@@ -73,14 +73,14 @@ <h2>Payment information</h2>
7373
<p>
7474
<label for="number">
7575
<span>Card number:</span>
76-
<strong><abbr title="required">*</abbr></strong>
76+
<strong><span aria-label="required">*</span></strong>
7777
</label>
7878
<input type="tel" id="number" name="cardnumber">
7979
</p>
8080
<p>
8181
<label for="expiration">
8282
<span>Expiration date:</span>
83-
<strong><abbr title="required">*</abbr></strong>
83+
<strong><span aria-label="required">*</span></strong>
8484
</label>
8585
<input type="text" name="expiration" required="true" placeholder="MM/YY" pattern="^(0[1-9]|1[0-2])\/([0-9]{2})$">
8686
</p>

html/forms/html-form-structure/required-labels.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,27 @@
88

99
<body>
1010
<form>
11-
<p>Required fields are followed by <abbr title="required">*</abbr>.</p>
11+
<p>Required fields are followed by <span aria-label="required">*</span>.</p>
1212

1313
<!-- So this: -->
1414
<!--<div>
1515
<label for="username">Name:</label>
1616
<input type="text" name="username">
17-
<label for="username"><abbr title="required">*</abbr></label>
17+
<label for="username"><span aria-label="required">*</span></label>
1818
</div>-->
1919

2020
<!-- would be better done like this: -->
2121
<!--<div>
2222
<label for="username">
2323
<span>Name:</span>
2424
<input id="username" type="text" name="username">
25-
<abbr title="required">*</abbr>
25+
<span aria-label="required">*</span>
2626
</label>
2727
</div>-->
2828

2929
<!-- But this is probably best: -->
3030
<div>
31-
<label for="username">Name: <abbr title="required">*</abbr></label>
31+
<label for="username">Name: <span aria-label="required">*</span></label>
3232
<input id="username" type="text" name="username">
3333
</div>
3434
</form>

html/introduction-to-html/advanced-text-formatting/other-semantics.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<title>Other semantics examples</title>
66
</head>
77
<body>
8-
<p>We use <abbr title="Hypertext Markup Language">HTML</abbr> to structure our web documents.</p>
8+
<p>We use <abbr>HTML</abbr>, Hypertext Markup Language, to structure our web documents.</p>
99

10-
<p>I think <abbr title="Reverend">Rev.</abbr> Green did it in the kitchen with the chainsaw.</p>
10+
<p>I think <abbr>Rev.</abbr> Green did it in the kitchen with the chainsaw.</p>
1111

1212
<address>
1313
<p>Chris Mills, Manchester, The Grim North, UK</p>

html/introduction-to-html/marking-up-a-letter-finished/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ <h1>Re: Eileen Dover university application</h1>
5555

5656
<p>Dear Eileen,</p>
5757

58-
<p>Thank you for your recent application to join us at the University of Awesome's science faculty to study as part of your <abbr title="Doctor of Philosophy">PhD</abbr> next year. I will answer your questions one by one, in the following sections.</p>
58+
<p>Thank you for your recent application to join us at the University of Awesome's science faculty to study as part of your <abbr>PhD</abbr> (Doctor of Philosophy) next year. I will answer your questions one by one, in the following sections.</p>
5959

6060
<h2>Starting dates</h2>
6161

@@ -78,7 +78,7 @@ <h2>Subjects of study</h2>
7878
<ol>
7979
<li>Turning H<sub>2</sub>O into wine, and the health benefits of Resveratrol (C<sub>14</sub>H<sub>12</sub>O<sub>3</sub>.)</li>
8080
<li>Measuring the effect on performance of funk bassplayers at temperatures exceeding 30°C (86°F), when the audience size exponentially increases (effect of 3 × 10<sup>3</sup> increasing to 3 × 10<sup>4</sup>.)</li>
81-
<li><abbr title="HyperText Markup Language">HTML</abbr> and <abbr title="Cascading Style Sheets">CSS</abbr> constructs for representing musical scores.</li>
81+
<li><abbr>HTML</abbr>, Hypertext Markup Language, and <abbr>CSS</abbr>, Cascading Style Sheets, constructs for representing musical scores.</li>
8282
</ol>
8383

8484
<p>So please can you provide more information on each of these subjects, including how long you'd expect the research to take, required staff and other resources, and anything else you think we'd need to know? Thanks.</p>
@@ -89,20 +89,20 @@ <h2>Exotic dance moves</h2>
8989

9090
<dl>
9191
<dt>Polynesian chicken dance</dt>
92-
<dd>A little known but <em>very</em> influential dance dating back as far as 300<abbr title="Before Christ">BC</abbr>, a whole village would dance around in a circle like chickens, to encourage their livestock to be "fruitful".</dd>
92+
<dd>A little known but <em>very</em> influential dance dating back as far as 300 <abbr>BC</abbr>, a whole village would dance around in a circle like chickens, to encourage their livestock to be "fruitful".</dd>
9393
<dt>Icelandic brownian shuffle</dt>
9494
<dd>Before the Icelanders developed fire as a means of getting warm, they used to practice this dance, which involved huddling close together in a circle on the floor, and shuffling their bodies around in imperceptibly tiny, very rapid movements. One of my fellow students used to say that he thought this dance inspired modern styles such as Twerking.</dd>
9595
<dt>Arctic robot dance</dt>
9696
<dd>An interesting example of historic misinformation, English explorers in the 1960s believed to have discovered a new dance style characterised by "robotic", stilted movements, being practiced by inhabitants of Northern Alaska and Canada. Later on however it was discovered that they were just moving like this because they were really cold.</dd>
9797
</dl>
9898

99-
<p>For more of my research, see my <a href="http://www.example.com" title="Dr Gaye's exotic dance research">exotic dance research page</a>.</p>
99+
<p>For more of my research, see my <a href="http://www.example.com" aria-label="Dr Gaye's exotic dance research">exotic dance research page</a>.</p>
100100

101101
<p>Yours sincerely,</p>
102102

103103
<p>Dr Eleanor Gaye</p>
104104

105105

106-
<p>University of Awesome motto: <q>Be awesome to each other.</q> -- <cite>The memoirs of Bill S Preston, <abbr title="Esquire">Esq</abbr></cite></p>
106+
<p>University of Awesome motto: <q>Be awesome to each other.</q> -- <cite>The memoirs of Bill S Preston, <abbr>Esq.</abbr></cite></p>
107107
</body>
108108
</html>

html/introduction-to-html/tasks/advanced-text/marking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ The finished code should look like this:
3030
3131
<p>Let's start with a quote:</p>
3232
33-
<blockquote cite="https://developer.mozilla.org/en-US/docs/Learn/Accessibility"><p>By default, <abbr title="Hypertext Markup Language">HTML</abbr> is accessible, if used correctly.</p></blockquote>
33+
<blockquote cite="https://developer.mozilla.org/en-US/docs/Learn/Accessibility"><p><abbr>HTML</abbr>, Hypertext Markup Language is by default accessible, if used correctly.</p></blockquote>
3434
35-
<p><abbr title="Cascading Style Sheets">CSS</abbr> can also be used to make web pages more, or less, accessible.</p>
35+
<p><abbr>CSS</abbr>, Cascading Style Sheets, can also be used to make web pages more, or less, accessible.</p>
3636
3737
<p>Chemical Formulae: H<sub>2</sub>O (Water), C<sub>2</sub>H<sub>6</sub>O (Ethanol).</p>
3838

0 commit comments

Comments
 (0)