Skip to content

Commit 328de59

Browse files
SchnWalterjelbourn
authored andcommitted
chore(cdk/a11y): fix a handful of typos
(#19181)
1 parent 7f0cd2d commit 328de59

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/cdk/a11y/aria-describer/aria-reference.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ describe('AriaReference', () => {
5050
.toEqual(['reference_1']);
5151
});
5252

53-
it('should retrieve ids that are deliminated by extra whitespace', () => {
53+
it('should retrieve ids that are delimited by extra whitespace', () => {
5454
testElement!.setAttribute('aria-describedby', 'reference_1 reference_2');
5555
expect(getAriaReferenceIds(testElement!, 'aria-describedby'))
5656
.toEqual(['reference_1', 'reference_2']);
5757
});
5858

5959
/**
60-
* Expects the equal array from getAriaReferenceIds and a space-deliminated list from
60+
* Expects the equal array from getAriaReferenceIds and a space-delimited list from
6161
* the actual element attribute. If ids is empty, assumes the element should not have any
6262
* value
6363
*/

src/cdk/a11y/aria-describer/aria-reference.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
/** IDs are deliminated by an empty space, as per the spec. */
10-
const ID_DELIMINATOR = ' ';
9+
/** IDs are delimited by an empty space, as per the spec. */
10+
const ID_DELIMITER = ' ';
1111

1212
/**
1313
* Adds the given ID to the specified ARIA attribute on an element.
@@ -18,7 +18,7 @@ export function addAriaReferencedId(el: Element, attr: string, id: string) {
1818
if (ids.some(existingId => existingId.trim() == id.trim())) { return; }
1919
ids.push(id.trim());
2020

21-
el.setAttribute(attr, ids.join(ID_DELIMINATOR));
21+
el.setAttribute(attr, ids.join(ID_DELIMITER));
2222
}
2323

2424
/**
@@ -30,7 +30,7 @@ export function removeAriaReferencedId(el: Element, attr: string, id: string) {
3030
const filteredIds = ids.filter(val => val != id.trim());
3131

3232
if (filteredIds.length) {
33-
el.setAttribute(attr, filteredIds.join(ID_DELIMINATOR));
33+
el.setAttribute(attr, filteredIds.join(ID_DELIMITER));
3434
} else {
3535
el.removeAttribute(attr);
3636
}
@@ -41,6 +41,6 @@ export function removeAriaReferencedId(el: Element, attr: string, id: string) {
4141
* Used for attributes such as aria-labelledby, aria-owns, etc.
4242
*/
4343
export function getAriaReferenceIds(el: Element, attr: string): string[] {
44-
// Get string array of all individual ids (whitespace deliminated) in the attribute value
44+
// Get string array of all individual ids (whitespace delimited) in the attribute value
4545
return (el.getAttribute(attr) || '').match(/\S+/g) || [];
4646
}

src/cdk/a11y/high-contrast-mode/high-contrast-mode-detector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const WHITE_ON_BLACK_CSS_CLASS = 'cdk-high-contrast-white-on-black';
2828
export const HIGH_CONTRAST_MODE_ACTIVE_CSS_CLASS = 'cdk-high-contrast-active';
2929

3030
/**
31-
* Service to determine whether the browser is currently in a high-constrast-mode environment.
31+
* Service to determine whether the browser is currently in a high-contrast-mode environment.
3232
*
3333
* Microsoft Windows supports an accessibility feature called "High Contrast Mode". This mode
3434
* changes the appearance of all applications, including web applications, to dramatically increase
@@ -46,7 +46,7 @@ export class HighContrastModeDetector {
4646
this._document = document;
4747
}
4848

49-
/** Gets the current high-constrast-mode for the page. */
49+
/** Gets the current high-contrast-mode for the page. */
5050
getHighContrastMode(): HighContrastMode {
5151
if (!this._platform.isBrowser) {
5252
return HighContrastMode.NONE;

0 commit comments

Comments
 (0)