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

fix(material/option): add fix for autocomplete mobile screen readers #29586

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

Conversation

DBowen33
Copy link
Contributor

added tabindex=-1 to add programmatic focus to mat-options

fixes b/272216403

@DBowen33 DBowen33 changed the title fix(material/option): add fix for automcomplete mobile screenr readers fix(material/option): add fix for automcomplete mobile screen readers Aug 15, 2024
@DBowen33 DBowen33 marked this pull request as ready for review August 15, 2024 01:32
@DBowen33 DBowen33 requested a review from a team as a code owner August 15, 2024 01:32
@DBowen33 DBowen33 requested review from crisbeto and amysorto and removed request for a team August 15, 2024 01:32
added tabindex=-1 to add programmatic focus to mat-options

fixes b/272216403
fix tests

fixes b/272216403
@DBowen33 DBowen33 changed the title fix(material/option): add fix for automcomplete mobile screen readers fix(material/option): add fix for autocomplete mobile screen readers Aug 15, 2024
@jelbourn jelbourn added the dev-app preview When applied, previews of the dev-app are deployed to Firebase label Aug 15, 2024
Copy link

Deployed dev-app for a55dfe7 to: https://ng-dev-previews-comp--pr-angular-components-29586-dev-kk3sbil8.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

expect(options[0].hasAttribute('tabindex')).toBeFalse();
expect(options[1].hasAttribute('tabindex')).toBeFalse();
expect(options[2].hasAttribute('tabindex')).toBeFalse();
it('should not omit the tabindex attribute on each option', fakeAsync(() => {
Copy link
Member

Choose a reason for hiding this comment

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

It looks like this was added to resolve a different accessibility issue: #26917

@comanescuadrian95
Copy link

Hello @crisbeto ,

I could not reach you. I know this question is not in regards of the current PR but I have a question in regards of the
autocomplete component, does autocomplete is meant to support displaying of custom textual messages for empty cases when searching. If so how could I achieve this using autocomplete?

Here is an exemple of what I mean more precisely. That I want to achieve with this angular material component.

https://stackoverflow.com/questions/61020581/react-material-ui-autocomplete-customize-no-options-text

@crisbeto
Copy link
Member

We don't currently support something like that, but feel free to open a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev-app preview When applied, previews of the dev-app are deployed to Firebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants