-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure label only focuses the first labelable child (#7553)
**Related Issue:** #5070 ## Summary Ensures label clicks focus on the first labelable child and ignores clicks on labelable children (as they will already receive focus). ### Noteworthy changes #### `label.ts` * no longer binds label click handler per labelable #### `commonTests.ts`/`labelable` test helper * now asserts that a clicked labelable child will own focus * grouped tests for both wrapped and sibling use cases * removed unnecessary `for` usage in wrapped test coverage ### `dom.ts` * add `isBefore` util to determine DOM order of elements (useful for sorting)
- Loading branch information
Showing
6 changed files
with
292 additions
and
123 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.