fix(material/radio): remove tabindex from host node - #21280
Merged
Conversation
Removes the `tabindex` from the host node, because it causes some a11y issues. We had it there before so that things like `cdkFocusInitial` would work, but after angular#21046 it isn't necessary anymore. Fixes angular#21266.
crisbeto
requested review from
devversion,
jelbourn and
mmalerba
as code owners
December 11, 2020 07:23
crisbeto
commented
Dec 11, 2020
| expect(radioButtonEl.getAttribute('tabindex')).toBe('-1'); | ||
| }); | ||
|
|
||
| it('should set the tabindex to -1 on the host element', () => { |
Member
Author
There was a problem hiding this comment.
This test was exactly the same as the one above so I removed it.
annieyw
reviewed
Dec 11, 2020
| '[class.mat-warn]': 'color === "warn"', | ||
| '[attr.tabindex]': 'disabled ? null : -1', | ||
| // Needs to be removed since it causes some a11y issues (see #21266). | ||
| '[attr.tabindex]': 'null', |
Contributor
There was a problem hiding this comment.
does it specifically have to be null or can it just be removed?
Member
Author
There was a problem hiding this comment.
It has to be null, because the tabindex can be set as <mat-radio tabindex="2"> which will set the input, but also keep the native attribute.
annieyw
approved these changes
Dec 11, 2020
crisbeto
added a commit
to crisbeto/material2
that referenced
this pull request
Jan 19, 2021
Similar to angular#21280. Removes the `tabindex` from the `mat-datepicker-toggle` host since it can caused accessibility issues. It was only there as a workaround which isn't required after angular#21046.
wagnermaciel
pushed a commit
to wagnermaciel/components
that referenced
this pull request
Jan 20, 2021
Removes the `tabindex` from the host node, because it causes some a11y issues. We had it there before so that things like `cdkFocusInitial` would work, but after angular#21046 it isn't necessary anymore. Fixes angular#21266.
andrewseguin
pushed a commit
that referenced
this pull request
Jan 25, 2021
andrewseguin
pushed a commit
that referenced
this pull request
Jan 25, 2021
wagnermaciel
pushed a commit
to wagnermaciel/components
that referenced
this pull request
Jan 26, 2021
Similar to angular#21280. Removes the `tabindex` from the `mat-datepicker-toggle` host since it can caused accessibility issues. It was only there as a workaround which isn't required after angular#21046.
mmalerba
pushed a commit
to mmalerba/components
that referenced
this pull request
Jan 29, 2021
Similar to angular#21280. Removes the `tabindex` from the `mat-datepicker-toggle` host since it can caused accessibility issues. It was only there as a workaround which isn't required after angular#21046.
wagnermaciel
pushed a commit
to wagnermaciel/components
that referenced
this pull request
Feb 8, 2021
Similar to angular#21280. Removes the `tabindex` from the `mat-datepicker-toggle` host since it can caused accessibility issues. It was only there as a workaround which isn't required after angular#21046.
wagnermaciel
pushed a commit
to wagnermaciel/components
that referenced
this pull request
Feb 8, 2021
Similar to angular#21280. Removes the `tabindex` from the `mat-datepicker-toggle` host since it can caused accessibility issues. It was only there as a workaround which isn't required after angular#21046.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
tabindexfrom the host node, because it causes some a11y issues. We had it there before so that things likecdkFocusInitialwould work, but after #21046 it isn't necessary anymore.Fixes #21266.