Skip to content

Commit 281e3b2

Browse files
authored
Replace smart quotes w/ regular quotes: /web (mdn#13106)
* Replace smart quotes w/ regular quotes: /web This PR is a part of mdn#13094. This PR replaces smart opening and closing quotes with regular quotes for the `/web` directory. * Fix title of Web/HTTP/CORS/Errors/CORSInvalidAllowHeader * Fix spaces * Fix title of Web/HTTP/CORS/Errors/CORSInvalidAllowHeader (accidentally reverted) * Fix title for all CORS pages
1 parent 0160aac commit 281e3b2

File tree

464 files changed

+957
-957
lines changed

Some content is hidden

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

464 files changed

+957
-957
lines changed

files/en-us/web/accessibility/aria/annotations/index.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Below we'll introduce the new features associated with ARIA annotations, and hav
2121
The ARIA attributes providing these new abilities are as follows:
2222

2323
- `aria-description=""` — provides a detailed description of an HTML element, as opposed to the brief label provided by [`aria-label`](/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).
24-
- `role="insertion"` and `role="deletion"` — semantically denote HTML elements whose contents represent an insertion to or deletion from the overall document. These are semantically equivalent to the HTML {{HTMLElement('ins')}} and {{HTMLElement('del')}} elements. Note that these arent part of the new ARIA annotations features, but they are of central relevance.
24+
- `role="insertion"` and `role="deletion"` — semantically denote HTML elements whose contents represent an insertion to or deletion from the overall document. These are semantically equivalent to the HTML {{HTMLElement('ins')}} and {{HTMLElement('del')}} elements. Note that these aren't part of the new ARIA annotations features, but they are of central relevance.
2525
- `role="mark"` — semantically denotes HTML elements containing text that is marked/highlighted for reference purposes. This is semantically equivalent to the HTML {{HTMLElement('mark')}} element.
2626
- `role="suggestion"` — semantically denotes a single proposed change to an editable document. This should be used on an element that wraps a single insertion and deletion (see `role="insertion"` and `role="deletion"` above).
2727
- `role="comment"` — semantically denotes a comment/reaction to some content on the page, or to a previous comment.
@@ -33,14 +33,14 @@ ARIA annotation roles and objects are currently exposed in:
3333
- Firefox from version 75 onwards, on Windows and Linux (on macOS, we are first waiting for Apple to define what Safari will expose as Apple-dialect attributes to VoiceOver, and will then follow suit.)
3434
- Chrome from version 81 onwards, currently behind the `#enable-accessibility-expose-aria-annotations` flag (go to `chrome://flags` to enable this.)
3535

36-
Unfortunately, you wont be able to use any of these yet, as screenreader support is currently not there. For the moment, you can see the annotations data being exposed with tools like [Firefox Accessibility Inspector](/en-US/docs/Tools/Accessibility_inspector). The annotations should just work once screenreader support is added.
36+
Unfortunately, you won't be able to use any of these yet, as screenreader support is currently not there. For the moment, you can see the annotations data being exposed with tools like [Firefox Accessibility Inspector](/en-US/docs/Tools/Accessibility_inspector). The annotations should just work once screenreader support is added.
3737

3838
## Associating annotated elements with their details
3939

40-
There are a number of different ways in which you can associate UI features with text labels or descriptions for accessibility purposes. It is useful to know when to use each. Youll see examples of most of these later on in the article, but briefly:
40+
There are a number of different ways in which you can associate UI features with text labels or descriptions for accessibility purposes. It is useful to know when to use each. You'll see examples of most of these later on in the article, but briefly:
4141

4242
- `aria-label=""` can be set on an element to provide a brief descriptive label when it isn't appropriate to have the label actually appearing in the UI, for example a [search input](/en-US/docs/Web/HTML/Element/input/search) in a horizontal nav bar.
43-
- `aria-labelledby=""` can be set on an element and given a value the same as the ID of an element that contains a label for the element. This is useful when the elements label is available in the UI, but for some reason a conventional {{HTMLElement('label')}} wont work.
43+
- `aria-labelledby=""` can be set on an element and given a value the same as the ID of an element that contains a label for the element. This is useful when the element's label is available in the UI, but for some reason a conventional {{HTMLElement('label')}} won't work.
4444
- `aria-description=""` works the same as `aria-label=""`, but is used when you want to give an element a more detailed description, rather than a short label.
4545
- `aria-describedby=""` works the same as `aria-labelledby=""`, but is used when you want to associate the element with a more detailed description, rather than a short label.
4646
- `aria-details=""` works in the same way as `aria-describedby=""`, except that it denotes more complex sets of details, rather than simple text descriptions. You can learn more about this in the next section.
@@ -49,7 +49,7 @@ There are a number of different ways in which you can associate UI features with
4949

5050
We have already alluded to the difference between these two above — `aria-describedby` is for textual descriptions, whereas `aria-details` is for more complex sets of details. But what does this actually mean?
5151

52-
`aria-describedby` is appropriate for associating an element with a simple text description, where you dont have much in the way of meaningful semantics contained within. For example:
52+
`aria-describedby` is appropriate for associating an element with a simple text description, where you don't have much in the way of meaningful semantics contained within. For example:
5353

5454
```html
5555
<p id="description-id">An extended text description of some kind...</p>
@@ -77,7 +77,7 @@ This difference really becomes apparent when you get to how the content is actua
7777

7878
## A basic description
7979

80-
Simple descriptions basically just involve usage of `aria-description` on an element to provide a description that cant be gotten from the elements text alone. As an example, lets say you have a poll/voting UI widget that shows numbers of votes, but you want to summarize the purpose of the widget in a clear description because the UI does not make it clear:
80+
Simple descriptions basically just involve usage of `aria-description` on an element to provide a description that can't be gotten from the element's text alone. As an example, let's say you have a poll/voting UI widget that shows numbers of votes, but you want to summarize the purpose of the widget in a clear description because the UI does not make it clear:
8181

8282
```html
8383
<section aria-description="Choose your favorite fruit — the fruit with the highest number of votes will be added to the lunch options next week.">
@@ -113,34 +113,34 @@ If the descriptive text does appear in the UI, you can link the description to t
113113
A common wish in online document systems like Google Docs is to be able to track changes, to see what reviewers or editors have suggested as changes to the text, before the managing editor or author accepts or rejects those changes. The semantics for this have long been available in HTML, via the {{HTMLElement('ins')}} and {{HTMLElement('del')}} elements:
114114

115115
```html
116-
<p>Freidas pet is a <del>black Cat called Luna</del><ins>purple Tyrannosaurus Rex called Tiny</ins>.</p>
116+
<p>Freida's pet is a <del>black Cat called Luna</del><ins>purple Tyrannosaurus Rex called Tiny</ins>.</p>
117117
```
118118

119119
With the new additions, you now have new roles available to provide the same semantics, should you be unable to use {{HTMLElement('ins')}} and {{HTMLElement('del')}} elements for some reason:
120120

121121
```html
122-
<p>Freidas pet is a <span role="deletion">black Cat called Luna</span><span role="insertion">purple Tyrannosaurus Rex called Tiny</span>.</p>
122+
<p>Freida's pet is a <span role="deletion">black Cat called Luna</span><span role="insertion">purple Tyrannosaurus Rex called Tiny</span>.</p>
123123
```
124124

125-
However, this often isnt enough — when youve got a content change like the one above that involves an insertion _and_ a deletion, there is no way for a screenreader user to work out if the two are related or not. This is the job of `role="suggestion"`, which should be set on an element wrapping both of them like so:
125+
However, this often isn't enough — when you've got a content change like the one above that involves an insertion _and_ a deletion, there is no way for a screenreader user to work out if the two are related or not. This is the job of `role="suggestion"`, which should be set on an element wrapping both of them like so:
126126

127127
```html
128-
<p>Freidas pet is a
128+
<p>Freida's pet is a
129129
<span role="suggestion"><span role="deletion">black Cat called Luna</span><span role="insertion">purple Tyrannosaurus Rex called Tiny</span></span>.
130130
</p>
131131
```
132132

133133
We could even provide an information box saying who made the suggestion and when, and associate it with the suggestion via `aria-details`:
134134

135135
```html
136-
<p>Freidas pet is a
136+
<p>Freida's pet is a
137137
<span role="suggestion" aria-details="comment-source"><span role="deletion">black Cat called Luna</span><span role="insertion">purple Tyrannosaurus Rex called Tiny</span></span>.
138138
</p>
139139

140140
<div id="comment-source">Suggested by Chris, <time datetime="2019-03-30T19:29">March 30 2021, 19:29</time></div>
141141
```
142142

143-
Browsers tend to provide a default black strikethrough for deletions, and a black underline for insertions, but youll probably want to use some more interesting styling of your own, for example:
143+
Browsers tend to provide a default black strikethrough for deletions, and a black underline for insertions, but you'll probably want to use some more interesting styling of your own, for example:
144144

145145
```css
146146
ins, [role="insertion"] {
@@ -165,7 +165,7 @@ ins, [role="insertion"], del, [role="deletion"] {
165165

166166
Online document applications also commonly feature commenting systems, and it would be nice to have a way to semantically associate commented content and its comments. ARIA annotations can help us here too.
167167

168-
Lets say we have a comment box like so:
168+
Let's say we have a comment box like so:
169169

170170
```html
171171
<div role="comment" id="thread-1" data-author="chris">
@@ -175,7 +175,7 @@ Let’s say we have a comment box like so:
175175
</div>
176176
```
177177

178-
Weve used `role="comment"` to mark this up as a comment. To associate the comment with the text being commented, we need to wrap the commented text with an element containing the `aria-details` attribute, the value of which should be the ID of the comment. {{HTMLElement('mark')}} is a suitable element for this purpose (a comment is a reference annotation), so the annotation could look like this:
178+
We've used `role="comment"` to mark this up as a comment. To associate the comment with the text being commented, we need to wrap the commented text with an element containing the `aria-details` attribute, the value of which should be the ID of the comment. {{HTMLElement('mark')}} is a suitable element for this purpose (a comment is a reference annotation), so the annotation could look like this:
179179

180180
```html
181181
<p>The last half of the song is a slow-rising crescendo that peaks at the
@@ -188,7 +188,7 @@ We’ve used `role="comment"` to mark this up as a comment. To associate the com
188188
</div>
189189
```
190190

191-
> **Note:** If for some reason you cant use the {{HTMLElement('mark')}} element in your application, you could also use [`<span role="mark"></span>`](/en-us/docs/web/accessibility/aria/roles/mark_role).
191+
> **Note:** If for some reason you can't use the {{HTMLElement('mark')}} element in your application, you could also use [`<span role="mark"></span>`](/en-us/docs/web/accessibility/aria/roles/mark_role).
192192
193193
Since `aria-details` can now accept multiple IDs, we can associate multiple comments with the same annotation, like so:
194194

files/en-us/web/accessibility/aria/forms/alerts/index.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ <h2 id="Checking_for_validity_and_notifying_the_user_2"><span class="mw-headline
4444
<p>Form validations consists of several steps:</p>
4545

4646
<ol>
47-
<li>Checking if the e-mail address or entered name are valid. Each field has a set of criteria which must be met in order to pass validation. In order to simplify this example, well check whether the e-mail address contains the “@” symbol, and if the name entry contains at least 1 character.</li>
48-
<li>If the above criteria is not met, the fields <code>aria-invalid</code> attribute will be given a value of “<code>true</code>”.</li>
49-
<li>If the criteria was not met, the user will be notified via an alert. Instead of using the JavaScript <code>alert</code> function, well use a simple WAI-ARIA widget for notification. This notifies the user of the error, but allows for them continue modifying the form without losing focus (caused by the “<code>onblur</code>” handler in JavaScript's default <code>alert</code> function).</li>
47+
<li>Checking if the e-mail address or entered name are valid. Each field has a set of criteria which must be met in order to pass validation. In order to simplify this example, we'll check whether the e-mail address contains the “@” symbol, and if the name entry contains at least 1 character.</li>
48+
<li>If the above criteria is not met, the field's <code>aria-invalid</code> attribute will be given a value of “<code>true</code>”.</li>
49+
<li>If the criteria was not met, the user will be notified via an alert. Instead of using the JavaScript '<code>alert</code>' function, we'll use a simple WAI-ARIA widget for notification. This notifies the user of the error, but allows for them continue modifying the form without losing focus (caused by the “<code>onblur</code>” handler in JavaScript's default '<code>alert</code>' function).</li>
5050
</ol>
5151

5252
<p>Below is example JavaScript code which could be inserted above the closing “<code>head</code>” tag:</p>
@@ -90,12 +90,12 @@ <h2 id="The_checkValidity_function_2"><span class="mw-headline" id="The_checkVal
9090

9191
<p>The primary method in JavaScript used for form validation is the <code>checkValidity</code> function. This method takes three parameters: The ID of the <code>input</code> that is to be validated, the term to search for to ensure validity, and the error message to be inserted into the alert.</p>
9292

93-
<p>To see if it is valid, the function checks whether the <code>indexOf</code> the <code>input</code>s value is anything greater than <code>-1</code>. A value of <code>-1</code> or less is returned if the index of the search term could not be found within the value.</p>
93+
<p>To see if it is valid, the function checks whether the <code>indexOf</code> the <code>input</code>'s value is anything greater than <code>-1</code>. A value of <code>-1</code> or less is returned if the index of the search term could not be found within the value.</p>
9494

9595
<p>If invalid, the function does two things:</p>
9696

9797
<ol>
98-
<li>It sets the elements <code>aria-invalid</code> attribute to “<code>true</code>”, which will indicate to screen readers that there is invalid content in here.</li>
98+
<li>It sets the element's <code>aria-invalid</code> attribute to “<code>true</code>”, which will indicate to screen readers that there is invalid content in here.</li>
9999
<li>It will call the <code>addAlert</code> function to add the alert with the provided error message.</li>
100100
</ol>
101101

@@ -105,15 +105,15 @@ <h2 id="The_addAlert_function_2"><span class="mw-headline" id="The_addAlert_func
105105

106106
<p>This function first removes any old alerts. The function is simple: It looks for an element with id “<code>alert</code>”, and if found, removes that from the <a href="/en-US/docs/Mozilla/Tech/XUL/Tutorial/Document_Object_Model">document object model</a>.</p>
107107

108-
<p>Next, the function creates a <code>div</code> element to hold the alert text. It gets an ID of “<code>alert</code>”. And it gets a role set of “alert”. This is actually ARIA-inspired, even though it doesnt say “aria” in the attribute name. This is because that role is based on the <a class="external text" href="https://www.w3.org/TR/xhtml-role/">XHTML Role Attribute Module</a> that was ported to HTML for simplicity.</p>
108+
<p>Next, the function creates a <code>div</code> element to hold the alert text. It gets an ID of “<code>alert</code>”. And it gets a role set of “alert”. This is actually ARIA-inspired, even though it doesn't say “aria” in the attribute name. This is because that role is based on the <a class="external text" href="https://www.w3.org/TR/xhtml-role/">XHTML Role Attribute Module</a> that was ported to HTML for simplicity.</p>
109109

110110
<p>The text is added to the <code>div</code> element, and the <code>div</code> element is added to the document.</p>
111111

112-
<p>The moment this happens, Firefox will fire an “alert” event to assistive technologies when this <code>div</code> appears. Most screen readers will pick this one up automatically and speak it. This is similar to the Notification Bar in Firefox that prompts you whether you want to save a password. The alert we just created does not have any buttons to press, it just tells us whats wrong.</p>
112+
<p>The moment this happens, Firefox will fire an “alert” event to assistive technologies when this <code>div</code> appears. Most screen readers will pick this one up automatically and speak it. This is similar to the Notification Bar in Firefox that prompts you whether you want to save a password. The alert we just created does not have any buttons to press, it just tells us what's wrong.</p>
113113

114114
<h2 id="Modifying_the_“onblur”_event"><span class="mw-headline" id="Adding_the_magic_to_the_.E2.80.9Conblur.E2.80.9D_event">Modifying the “<code>onblur</code>” event</span></h2>
115115

116-
<p>All thats left now is add the event handler. We need to change the two inputs for e-mail and name for this:</p>
116+
<p>All that's left now is add the event handler. We need to change the two inputs for e-mail and name for this:</p>
117117

118118
<pre class="brush: html"> &lt;input name="name" id="name" aria-required="true"
119119
onblur="checkValidity('name', ' ', 'Invalid name entered!');"/&gt;
@@ -127,8 +127,8 @@ <h2 id="Modifying_the_“onblur”_event"><span class="mw-headline" id="Adding_t
127127
<p>If you use Firefox 3 and a currently-supported screen reader, try the following:</p>
128128

129129
<ol>
130-
<li>Enter only your first name as the name. When tabbing, youll hear an alert that tells you youve entered an invalid name. You can then shift-tab back and correct the error.</li>
131-
<li>Enter an e-mail address without the “@” symbol. When tabbing out of this field, you should hear a warning that says you didnt enter a valid e-mail address.</li>
130+
<li>Enter only your first name as the name. When tabbing, you'll hear an alert that tells you you've entered an invalid name. You can then shift-tab back and correct the error.</li>
131+
<li>Enter an e-mail address without the “@” symbol. When tabbing out of this field, you should hear a warning that says you didn't enter a valid e-mail address.</li>
132132
</ol>
133133

134134
<p>In both cases, when returning focus to the field in question, your screen reader should tell you that this field is invalid. JAWS 9 supports this, but JAWS 8 does not, so this may not work in all versions of the screen readers supported.</p>
@@ -137,8 +137,8 @@ <h2 id="A_few_questions_that_you_might_have_2"><span class="mw-headline" id="A_f
137137

138138
<dl>
139139
<dt>Q. Why did you put both “<code>(required)</code>” in the label text and the <code>aria-required</code> attribute on some of the inputs?</dt>
140-
<dd>A. If this were a real live form, and the site was being visited by a browser that does not yet support ARIA, wed still want to give an indication that this is a required field.</dd>
141-
<dt>Q. Why dont you set focus back to the invalid field automatically?</dt>
140+
<dd>A. If this were a real live form, and the site was being visited by a browser that does not yet support ARIA, we'd still want to give an indication that this is a required field.</dd>
141+
<dt>Q. Why don't you set focus back to the invalid field automatically?</dt>
142142
<dd>A. Because this is not allowed by the Windows API specs, and possibly others. Also, letting the focus jump around without real user interaction too often is not a nice thing to do in general. </dd>
143143
</dl>
144144

0 commit comments

Comments
 (0)