Skip to content

refactor(material-experimental/mdc-checkbox): remove usage of term blacklist #20655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/material-experimental/mdc-checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements AfterViewInit,
* MDC uses animation events to determine when to update `aria-checked` which is unreliable.
* Therefore we disable it and handle it ourselves.
*/
private _attrBlacklist = new Set(['aria-checked']);
private _mdcFoundationIgnoredAttrs = new Set(['aria-checked']);

/** The `MDCCheckboxAdapter` instance for this checkbox. */
private _checkboxAdapter: MDCCheckboxAdapter = {
Expand All @@ -229,13 +229,13 @@ export class MatCheckbox extends _MatCheckboxMixinBase implements AfterViewInit,
isIndeterminate: () => this.indeterminate,
removeNativeControlAttr:
(attr) => {
if (!this._attrBlacklist.has(attr)) {
if (!this._mdcFoundationIgnoredAttrs.has(attr)) {
this._nativeCheckbox.nativeElement.removeAttribute(attr);
}
},
setNativeControlAttr:
(attr, value) => {
if (!this._attrBlacklist.has(attr)) {
if (!this._mdcFoundationIgnoredAttrs.has(attr)) {
this._nativeCheckbox.nativeElement.setAttribute(attr, value);
}
},
Expand Down