-
Notifications
You must be signed in to change notification settings - Fork 80
fix(radio-button-group): no longer focus first radio button on label click and adds setFocus
method.
#7050
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
Merged
anveshmekala
merged 19 commits into
master
from
anveshmekala/6357-fix-radio-button-text-select-issue
Jun 7, 2023
Merged
fix(radio-button-group): no longer focus first radio button on label click and adds setFocus
method.
#7050
Changes from 7 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
3585474
fix(radio-group): user can select text in radio group
anveshmekala 0d52082
Merge branch 'master' into anveshmekala/6357-fix-radio-button-text-se…
anveshmekala f70b1a1
add setFocus for radio button group
anveshmekala 61fdbea
Merge branch 'master' into anveshmekala/6357-fix-radio-button-text-se…
anveshmekala b15ff52
simplify logic
anveshmekala 2753186
remove white space
anveshmekala 4b5ca37
add more e2e tests
anveshmekala 082cb9c
clean up
anveshmekala 1740178
Merge branch 'master' into anveshmekala/6357-fix-radio-button-text-se…
anveshmekala c389f18
focus first focusable item on tab
anveshmekala 1357821
Merge branch 'master' into anveshmekala/6357-fix-radio-button-text-se…
anveshmekala cffff6d
update focus algorithm
anveshmekala 88cd7ce
Merge branch 'master' into anveshmekala/6357-fix-radio-button-text-se…
anveshmekala f7f25d7
fix test error
anveshmekala 55c2018
cleanup
anveshmekala 955b751
Merge branch 'master' into anveshmekala/6357-fix-radio-button-text-se…
anveshmekala 0510a88
refactor
anveshmekala 2a0cc42
revert changes to radio-button
anveshmekala 184e2a9
Merge branch 'master' into anveshmekala/6357-fix-radio-button-text-se…
anveshmekala File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the
focusFirstTabbable
helper in the dom utils?This is what the modal does...
Would we want only 1 radio button within a group tabbable at a time? Seems like that might make for a good enhancement in the future.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried implementing
focusFirstTabbable
helper here, it works well if none if the radio-button's in the group are disabled. The reason for this is the way we assign tabIndex at theradio-button
level. ThetabIndex=0
only if the radio-button ischecked
or if its the first element in the group. I think this is a bug.Wonder if the assignment oftabIndex
should stay at the group level not theradio-button
level.The above is following w3 radio group pattern keyboard specs i believe. One button is tabbable and the user can use Arrow Keys to navigate between the items.