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-tabs: add scrollable container option #2062

Open
randybascue opened this issue May 12, 2023 · 11 comments
Open

ebay-tabs: add scrollable container option #2062

randybascue opened this issue May 12, 2023 · 11 comments

Comments

@randybascue
Copy link

Problem

Tabs can extend beyond their container. Users need to be able to scroll tabs to view those off screen.

Playbook →
Figma →

Example

image

@agliga
Copy link
Contributor

agliga commented May 25, 2023

@ianmcburnie I wanted to get your perspective on this first, if there are any issues from an accessibility perspective on this?
Especially with the navigation left/right on tabs.

@ianmcburnie
Copy link
Contributor

ianmcburnie commented May 25, 2023

@ianmcburnie I wanted to get your perspective on this first, if there are any issues from an accessibility perspective on this? Especially with the navigation left/right on tabs.

I think so long as .focus() is being set on every arrow key press (which it is, via makeup-roving-tabindex), then the horizontal scrollable region should automatically scroll into place. Worth testing to make sure!

@ianmcburnie
Copy link
Contributor

ianmcburnie commented May 26, 2023

What if the text of the tabs falls within the space of the viewport (i.e. the text isn't cut off like in the screen shot above)? In this case, there would be no visual affordance that the region is horizontally scrollable. Needs further discussion with design team.

Could an overflow menu button be an alternative to scrolling? (horizontal scrolling is not much fun)

@PrashantAshok
Copy link
Contributor

PrashantAshok commented May 26, 2023

Maybe "scroll shadow" can work (Along with some aria-labels)? I think except Safari other browsers are ok. All browsers work, would need to check older versions.

@agliga
Copy link
Contributor

agliga commented Sep 19, 2023

If we want to do this issue we need the following:

  1. We need to have better affordance. We can't rely on text being cut off
  2. Is there a scrollbar? Where does it show?
  3. Discussion on A11Y: https://www.w3.org/WAI/WCAG21/Understanding/pointer-gestures.html
    • Potentially resolved automatically if we go with native HTML scrollbar (see 2)

@agliga
Copy link
Contributor

agliga commented Nov 16, 2023

Discussed about this. Possibly will add a common scrolling component.

@ArtBlue
Copy link
Contributor

ArtBlue commented Apr 19, 2024

If we do use the scrolling solution, we absolutely must have a scroll shadow to provide affordance that there are additional items hidden from view. It's not a strong indicator, but it's something.

If we want to make the solution as robust as possible, we may also want to consider both 2-row tabs AND scrolling (w/scroll shadow).

@ArtBlue
Copy link
Contributor

ArtBlue commented Apr 23, 2024

I did some digging after we briefly looked at it as a team. It would be preferable to allow for more text, so I explored what that would look like...

image

This is at 320px width.

The vertical tabs uses the same exact markup.

@ianmcburnie
Copy link
Contributor

ianmcburnie commented Apr 23, 2024

Ooo - I like the vertical tabs! I guess the main concern though is whether that's a comfortable enough line length for reading (in the content panel I mean). Maybe the tabs could go even narrower if not, but good to check with design.

@ArtBlue
Copy link
Contributor

ArtBlue commented Apr 23, 2024

@ianmcburnie , yea, we can make the tabs even narrower. If the max-width of each tab on horizontal matches the max-width of the vertical tabs, it allows more flexibility since the longer length of one tab doesn't impact the others and you can have more tabs without impacting others.

@agliga
Copy link
Contributor

agliga commented Apr 29, 2024

@randybascue could we get another look at this? I know this is being asked by some teams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

5 participants