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

Mat-Selection-List disabled options keyboard selectable #12608

Closed
PanWill opened this issue Aug 9, 2018 · 5 comments · Fixed by #12617
Closed

Mat-Selection-List disabled options keyboard selectable #12608

PanWill opened this issue Aug 9, 2018 · 5 comments · Fixed by #12617
Assignees
Labels
P2 The issue is important to a large percentage of users, with a workaround

Comments

@PanWill
Copy link

PanWill commented Aug 9, 2018

Bug, feature request, or proposal:

Hello, I am not sure but I think that one shouldn't be able to override disable via keyboard selection (ie: going to the disabled option via tab, down arrow and return). But could be I missed something in the docs.

What is the expected behavior?

What is the current behavior?

See StackBlitz please

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-m5gtdy
tab to selection list hit down key and enter

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Is there anything else we should know?

@devversion
Copy link
Member

It's actually intentional. We wanted to make sure that users with a screen reader still have the possibility to see what options are part of the selection list.

@PanWill
Copy link
Author

PanWill commented Aug 9, 2018

Ok, read yes, navigate yes, but act on (hitting enter)? When that is not the same functionality as non screen readers the intention seems counter intuitive. We want screen reader users to have functionality that does not exist otherwise and causing errors to be sent in forms? Is there a way to disable this? Thank you for your response, I can look into disabling keyboard navigation.

@devversion
Copy link
Member

devversion commented Aug 9, 2018

@PanWill Well, a value change while the list is disabled should be surely not the case. I will look into it.

@devversion devversion self-assigned this Aug 9, 2018
@devversion devversion added the P2 The issue is important to a large percentage of users, with a workaround label Aug 9, 2018
@devversion
Copy link
Member

@PanWill It seems like I misread your issue at first and just considered the keyboard navigation. Changing the value shouldn't be possible if the list is disabled. Thanks for your issue. I will look into this asap.

devversion added a commit to devversion/material2 that referenced this issue Aug 10, 2018
* Currently due to a misplaced `disabled` check in the selection list, users can toggle the state of a disabled `<mat-option>` by using the keyboard.

Fixes angular#12608
devversion added a commit to devversion/material2 that referenced this issue Aug 10, 2018
* Currently due to a misplaced `disabled` check in the selection list, users can toggle the state of a disabled `<mat-option>` by using the keyboard.

Fixes angular#12608
mmalerba pushed a commit that referenced this issue Aug 16, 2018
* fix(selection-list): do not allow toggling disabled options

* Currently due to a misplaced `disabled` check in the selection list, users can toggle the state of a disabled `<mat-option>` by using the keyboard.

Fixes #12608

* Rename function
mmalerba pushed a commit that referenced this issue Aug 20, 2018
* fix(selection-list): do not allow toggling disabled options

* Currently due to a misplaced `disabled` check in the selection list, users can toggle the state of a disabled `<mat-option>` by using the keyboard.

Fixes #12608

* Rename function
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 The issue is important to a large percentage of users, with a workaround
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants