Skip to content
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

feat(material/chips): add unit tests for custom aria-describedby #24657

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RobertAKARobin
Copy link
Contributor

Continuation of #24292

See also #24644 for MatSelect

@andrewseguin
Copy link
Contributor

This component will soon be deprecated in favor of the MDC one. Can you add this test there as well?

@RobertAKARobin
Copy link
Contributor Author

@andrewseguin Unfortunately it seems I can't run the tests due to using a newer Macbook. I followed the steps here #23983 (comment) but no dice.

@devversion
Copy link
Member

@RobertAKARobin M1 should work to my knowledge. We should close the issue, unless you have more details.

@RobertAKARobin
Copy link
Contributor Author

@devversion I'll follow up in that other issue. Once I've got yarn test mdc-chips working I'd be happy to update this.

@RobertAKARobin
Copy link
Contributor Author

@devversion Updated! The mat-chips specs test its usage in mat-form-field, but there aren't any existing FormField specs for mdc-chips. Adding all that felt like it was outside the scope of this PR.

this._userAriaDescribedBy = userAriaDescribedBy;
}

private _userAriaDescribedBy: string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the getter/setter needed here? Also I lack a little on context for this change I feel like. I thought we only needed the custom input when a component was a FormFieldControl where we also added additional described by ids automatically, using .setDescribedByIds

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewseguin Can you explain a bit more about what changes you were looking for?

@devversion Yes, the getters/setters seem unnecessary. I was copying from the mat-chips code (which in turn was copied from mat-select, IIRC). Will wait to see what Andrew says though.

@andrewseguin andrewseguin removed their assignment Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants