Repository navigation
fix(keyboard): don't report Material checkbox/radio touch targets as unreachable (0.18.1) - #45
Merged
Merged
Conversation
…ts as unreachable Angular Material 15 to 21 puts an empty, aria-hidden touch target with a click handler beside the native input in every checkbox and radio button. Tab reaches the input, but ngbr/unreachable-control reported the touch target. Skip an empty aria-hidden element with a click listener whose parent holds a native control. Release 0.18.1.
Review: beside a text field or a button, an empty aria-hidden clickable is usually a separate action (a CSS-drawn clear button), so it stays reported. Skipped hit areas are also kept out of the hover check.
… there) Only Material 21 marks the checkbox/radio touch target aria-hidden; 15 to 20 render the same empty element and click handler without it. Being empty, role-less and beside a checkbox or radio input is enough.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Angular Material 15–21 render an empty
.mat-mdc-checkbox-touch-target/.mat-mdc-radio-touch-targetdiv with a click handler beside the native input.ngbr/unreachable-control(and the hover check) reported it as a clickable you can't reach by keyboard. The input itself is a normal tab stop, so this was always a false positive.The keyboard scan now skips an empty, role-less clickable whose parent holds an
input[type=checkbox]orinput[type=radio]. It doesn't requirearia-hidden, since Material 15–20 don't set it. Other native controls aren't covered, so a CSS clear-× next to a text input is still reported.