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

ebay-listbox-button: keyboard focus issue after shift-tabbing back to button from listbox #1778

Open
ianmcburnie opened this issue Oct 3, 2022 · 3 comments

Comments

@ianmcburnie
Copy link
Contributor

ianmcburnie commented Oct 3, 2022

Bug Report

eBayUI Version: 10.x

Description

  1. Goto: https://opensource.ebay.com/ebayui-core/?path=/story/buttons-ebay-listbox-button--default
  2. Set keyboard focus on button
  3. Press ENTER or SPACEBAR
  4. Press SHIFT+TAB
  5. Press TAB

Result: listbox collapses, and focus moves to next focusable element on page.
Expected: focus returns to listbox.

I think we just need to change the listbox to have tabindex=0 when in expanded state, rather than tabindex=-1, as in this example: https://makeup.github.io/makeup-js/makeup-listbox-button/index.html

Workaround

Yes. Move focus back to button and press ENTER or SPACEBAR again to re-open listbox.

@agliga
Copy link
Contributor

agliga commented Oct 26, 2022

This might be an issue with makeup-expander.
I switched the tabindex to 0 in the code but expander is switching it to -1
https://github.com/makeup/makeup-js/blob/master/packages/makeup-expander/src/index.js#L89-L92
We might have to change the focusManagament.

@agliga agliga added this to eBayUI Jan 3, 2023
@agliga agliga added the size: 1 label Aug 22, 2024
@saiponnada
Copy link
Contributor

saiponnada commented Nov 5, 2024

Currently when we shift tab from the listbox or menu item back to the button, the overlay stays open. I believe this was by design originally, but in retrospect I think it would probably make more sense if the overlay collapses (and can then easily be opened by SPACEBAR/ENTER again).

There is currently an issue open on makeup that will resolve this issue.

@saiponnada
Copy link
Contributor

Fixed this issue in v15.0.0. Ref: dc6aa3f

@saiponnada saiponnada moved this to Done in eBayUI Jan 30, 2025
@saiponnada saiponnada added this to the 15.0.0 milestone Jan 30, 2025
@saiponnada saiponnada reopened this Jan 31, 2025
@github-project-automation github-project-automation bot moved this from Done to In Progress in eBayUI Jan 31, 2025
@saiponnada saiponnada modified the milestones: 15.0.0, 15.1.0 Jan 31, 2025
@ArtBlue ArtBlue modified the milestones: 15.1.0, 15.2.0 Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

4 participants