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

Tab into radio group handles disabled groups differently #47

Closed
Dayna-A opened this issue Jul 12, 2021 · 7 comments
Closed

Tab into radio group handles disabled groups differently #47

Dayna-A opened this issue Jul 12, 2021 · 7 comments
Assignees
Labels
help wanted Extra attention is needed, this user requires assistance to complete the work Type: Bug Bug or Bug fixes

Comments

@Dayna-A
Copy link

Dayna-A commented Jul 12, 2021

Describe the bug

In some cases, tabbing through focusable items on a page will fail to skip disabled radio groups.

To Reproduce

Steps to reproduce the behavior:

  1. run the demo page in auro-radio
  2. tab through the page
  3. notice the focus lands on the first element in the disabled radio group.
  4. HOWEVER in other pages it sometimes skips it.(see two attached videos)

Expected behavior

Disabled radio buttons/groups are not focusable.

Screenshots

In repo demo page -> https://drive.google.com/file/d/13eODKqjOAX1c2_UctUdCPOZGFXkx-wjC/view

In demo docs page ->

Screen.Recording.2021-07-12.at.12.03.58.PM.mov

Desktop (please complete the following information):

  • OS: macOS Big Sur 11.2.3
  • Browser: Chrome 91.0.4472.114
@Dayna-A Dayna-A added the Type: Bug Bug or Bug fixes label Jul 12, 2021
@blackfalcon blackfalcon added Status: Work In Progress Issue or Pull Request work is in Progress and removed Status: Work In Progress Issue or Pull Request work is in Progress labels Jul 20, 2021
@blackfalcon blackfalcon changed the title auro-radio: tab into radio group handles disabled groups differently [linked]: tab into radio group handles disabled groups differently Aug 18, 2021
@blackfalcon blackfalcon changed the title [linked]: tab into radio group handles disabled groups differently Tab into radio group handles disabled groups differently Aug 18, 2021
@blackfalcon blackfalcon removed their assignment Aug 24, 2021
@blackfalcon blackfalcon removed the Story label Sep 4, 2021
@braven112 braven112 added this to the v2.0-rc milestone Nov 11, 2021
@blackfalcon
Copy link
Member

This issue persists with the concept of disabling the whole radio group.

Screen Shot 2022-01-31 at 1 39 50 PM

The error is specifically with the disabled at the auro-radio-group element. The issue does not appear if the individual auro-radio elements have the disabled attribute and the group does not.

A potential re-work is to have the element place the disabled attribute on the individual elements in the slot versus trying to manage the disabled concept from an outer element.

While this is not an issue with auro-menu (yet), the same situation exists. AlaskaAirlines/auro-menu#65

@blackfalcon
Copy link
Member

Moving this to READY FOR WORK as the issue does exist and there is a strong potential for a memory leak when the disabled attribute is used at the group level.

Similar work is being done with auro-menu that may help shed light on the solution for this issue.

@blackfalcon
Copy link
Member

There is an opportunity to refactor some of the moving logic for this element based on what was learned with this PR to auro-menu

AlaskaAirlines/auro-menu#81

@blackfalcon
Copy link
Member

This doesn't need to be a part of a RC. Bugs can go straight to main for release.

@blackfalcon blackfalcon removed this from the auro-radio v2.0-rc milestone Feb 3, 2022
@braven112 braven112 added this to the auro-radio bugs milestone Feb 4, 2022
@blackfalcon blackfalcon removed this from the auro-radio bugs milestone Jun 20, 2022
@blackfalcon blackfalcon added the help wanted Extra attention is needed, this user requires assistance to complete the work label Jun 20, 2022
@fajar-apri-alaska
Copy link
Contributor

I believe this could be fixed by adding a condition inside resetRadio function handler when setting the tabIndex like so:

// src/auro-radio-group.js

resetRadio() {
  ...

  if (!this.disabled) {
    this.items[this.index].tabIndex = 0;
  }
}

fajar-apri-alaska added a commit to fajar-apri-alaska/auro-radio that referenced this issue Jun 21, 2023
Changes to be committed:
	modified:   package-lock.json
	modified:   src/auro-radio-group.js
@blackfalcon
Copy link
Member

@fajar-apri-alaska feel free to submit a PR with that fix. Thanks for the feedback.

@fajar-apri-alaska
Copy link
Contributor

@fajar-apri-alaska feel free to submit a PR with that fix. Thanks for the feedback.

I did already, in #109

@blackfalcon blackfalcon linked a pull request Jun 28, 2023 that will close this issue
3 tasks
fajar-apri-alaska added a commit to fajar-apri-alaska/auro-radio that referenced this issue Jun 28, 2023
Changes to be committed:
	modified:   package-lock.json
	modified:   src/auro-radio-group.js
fajar-apri-alaska added a commit to fajar-apri-alaska/auro-radio that referenced this issue Jul 3, 2023
Changes to be committed:
	modified:   package-lock.json
	modified:   src/auro-radio-group.js
@settings settings bot removed the auro-radio label Jul 19, 2023
blackfalcon pushed a commit that referenced this issue Jul 19, 2023
# [1.7.0](v1.6.2...v1.7.0) (2023-07-19)

### Bug Fixes

* **ce:** account for custom naming elements in our api ([11a9b0e](11a9b0e))
* **focus:** make disabled inputs non focusable [#47](#47) ([e140fba](e140fba))
* **input:** make html5 input receive click ([d58a36a](d58a36a))

### Features

* **update:** update repo using new version of generator [#110](#110) ([d06b255](d06b255))

### Performance Improvements

* **csspart:** add csspart to radio-group fieldset [#103](#103) ([75285c9](75285c9))
* **deps:** update dependencies ([6a4d981](6a4d981))
* **release:** update release configuration ([32f60a1](32f60a1))
* **repo:** update references from master to main ([16d8eb3](16d8eb3))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed, this user requires assistance to complete the work Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants