aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/html/global_attributes/spellcheck/index.html
blob: 6a9d94f1fc2230af4cfc2c5fafe76d160d524ead (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
---
title: spellcheck
slug: Web/HTML/Global_attributes/spellcheck
tags:
  - Experimental
  - Global attributes
  - HTML
  - Reference
translation_of: Web/HTML/Global_attributes/spellcheck
---
<p class="note">{{HTMLSidebar("Global_attributes")}}{{SeeCompatTable}}</p>

<p>L'atribut global spellcheck és un atribut enumerat defineix si en l'element es poden comprovar els errors d'ortografia. Pot tenir els següents valors:</p>

<ul>
 <li><code>true</code>, indica que l'element, si és possible, se li ha de comprovar els errors d'ortografia;</li>
 <li><code>false</code>, indica que l'element, si és possible, no se li ha de comprovar els errors d'ortografia.</li>
</ul>

<p>Si aquest atribut no està establert, el valor predeterminat és de tipus d'element i definit pel navegador. Aquest valor per defecte també pot <em>heretar</em>, la qual cosa vol dir que el contingut de l'element es revisa l'ortografia només si el seu ancestre més proper té un estat <code>true</code> per la correcció ortogràfica.<br>
 <br>
 Podeu consultar <a href="/en/HTML/Controlling_spell_checking_in_HTML_forms" title="en/Controlling spell checking in HTML forms">aquest article</a> per veure un exemple complet de l'ús d'aquest atribut.</p>

<p>Aquest atribut és un enumerat i no un booleà. Això vol dir que l'ús explícit d'un dels valors <code>true</code> o <code>false</code> és obligatori i que una forma abreujada com <code>&lt;label spellcheck&gt;</code>Exemple <code>Label&lt;/ label&gt;</code> no està permès. L'ús correcte és <code>&lt;label spellcheck="true"&gt;</code>Exemple <code>Label&lt;/label&gt;</code>.</p>

<p>Aquest atribut és simplement un suggeriment per al navegador: els navegadors no són necessaris per a poder comprovar els errors d'ortografia. Generalment, els elements no editables no es comproven els errors d'ortografia, tot i que l'atribut <strong>spellcheck</strong> s'estableixi en <code>true</code> i el navegador sigui compatible amb la correcció ortogràfica.</p>

<p>El <em>valor per defecte</em> d'aquest atribut depèn del navegador i l'element:</p>

<table class="fullwidth-table">
 <tbody>
  <tr>
   <th>Browser</th>
   <th>{{ HTMLElement("html") }}</th>
   <th>{{ HTMLElement("textarea") }}</th>
   <th>{{ HTMLElement("input") }}</th>
   <th>others</th>
   <th>Comment</th>
  </tr>
  <tr>
   <td rowspan="3">Firefox</td>
   <td><code>false</code></td>
   <td><code>false</code></td>
   <td><code>false</code></td>
   <td><em>inherited</em></td>
   <td>When <code>layout.spellcheckDefault</code> is <code>0</code></td>
  </tr>
  <tr>
   <td><strong><code>false</code></strong></td>
   <td><strong><code>true</code></strong></td>
   <td><strong><em>inherited</em></strong></td>
   <td><strong><em>inherited</em></strong></td>
   <td><strong>When <code>layout.spellcheckDefault</code> is <code>1</code> (default value)</strong></td>
  </tr>
  <tr>
   <td><code>false</code></td>
   <td><code>true</code></td>
   <td><code>true</code></td>
   <td><em>inherited</em></td>
   <td>When <code>layout.spellcheckDefault</code> is <code>2</code></td>
  </tr>
  <tr>
   <td rowspan="3">Seamonkey</td>
   <td><code>false</code></td>
   <td><code>false</code></td>
   <td><code>false</code></td>
   <td><em>inherited</em></td>
   <td>When <code>layout.spellcheckDefault</code> is <span style="font-family: Courier New;"><code>0</code></span></td>
  </tr>
  <tr>
   <td><strong><code>false</code></strong></td>
   <td><strong><code>true</code></strong></td>
   <td><strong><em>inherited</em></strong></td>
   <td><strong><em>inherited</em></strong></td>
   <td><strong>When <code>layout.spellcheckDefault</code> is <span style="font-family: Courier New;">1</span> (default value)</strong></td>
  </tr>
  <tr>
   <td><code>false</code></td>
   <td><code>true</code></td>
   <td><code>true</code></td>
   <td><em>inherited</em></td>
   <td>When <code>layout.spellcheckDefault</code> is <span style="font-family: Courier New;"><code>2</code></span></td>
  </tr>
  <tr>
   <td rowspan="3">Camino</td>
   <td><code>false</code></td>
   <td><code>false</code></td>
   <td><code>false</code></td>
   <td><em>inherited</em></td>
   <td>When <code>layout.spellcheckDefault</code> is <span style="font-family: Courier New;"><code>0</code></span></td>
  </tr>
  <tr>
   <td><code>false</code></td>
   <td><code>true</code></td>
   <td><em>inherited</em></td>
   <td><em>inherited</em></td>
   <td>When <code>layout.spellcheckDefault</code> is <span style="font-family: Courier New;"><code>1</code></span></td>
  </tr>
  <tr>
   <td><strong><code>false</code></strong></td>
   <td><strong><code>true</code></strong></td>
   <td><strong><code>true</code></strong></td>
   <td><strong><em>inherited</em></strong></td>
   <td><strong>When <span style="font-family: Courier New;">layout.spellcheckDefault</span> is <span style="font-family: Courier New;"><code>2</code> </span><strong>(default value)</strong></strong></td>
  </tr>
  <tr>
   <td>Chrome</td>
   <td><code>false</code></td>
   <td><code>true</code></td>
   <td>?</td>
   <td><em>inherited</em></td>
  </tr>
  <tr>
   <td>Internet Explorer</td>
   <td><code>false</code></td>
   <td><code>true</code></td>
   <td>?</td>
   <td><em>inherited</em></td>
  </tr>
  <tr>
   <td>Opera</td>
   <td><code>false</code></td>
   <td><code>true</code></td>
   <td>?</td>
   <td><em>inherited</em></td>
  </tr>
  <tr>
   <td>Safari</td>
   <td><code>false</code></td>
   <td><code>true</code></td>
   <td>?</td>
   <td><em>inherited</em></td>
  </tr>
 </tbody>
</table>

<h2 id="Especificacions">Especificacions</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Especificació</th>
   <th scope="col">Estat</th>
   <th scope="col">Comentari</th>
  </tr>
  <tr>
   <td>{{SpecName('HTML WHATWG', "interaction.html#spelling-and-grammar-checking", "spellcheck")}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>Sense canvis des de l'última instantània, {{SpecName('HTML5.1')}}</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5.1', "editing.html#spelling-and-grammar-checking", "spellcheck")}}</td>
   <td>{{Spec2('HTML5.1')}}</td>
   <td>Instantània de {{SpecName('HTML WHATWG')}}, definició inicial.</td>
  </tr>
 </tbody>
</table>

<h2 id="Navegadors_compatibles">Navegadors compatibles</h2>

<p>{{ CompatibilityTable() }}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Característica</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Suport bàsic</td>
   <td>{{ CompatVersionUnknown() }}</td>
   <td>{{ CompatGeckoDesktop("1.8.1") }}</td>
   <td>{{ CompatVersionUnknown() }}</td>
   <td>{{ CompatVersionUnknown() }}</td>
   <td>{{ CompatVersionUnknown() }}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Característica</th>
   <th>Android</th>
   <th>Chrome for Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Suport bàsic</td>
   <td>{{ CompatNo() }}</td>
   <td>{{ CompatUnknown}}</td>
   <td>{{ CompatGeckoMobile("1.8.1") }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
  </tr>
 </tbody>
</table>
</div>

<h2 id="Veure">Veure</h2>

<ul>
 <li>Tots els <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes">atributs globals</a>.</li>
</ul>