-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Tabs] remove dropdown variant for tabs #4758
Comments
CC @carbon-design-system/design |
@tessarodes the problem we were running into when going from tabs to the dropdown is that under the hood these are two distinct pieces of functionality that screen readers use, namely For tabs, we might see something announced like: For listbox (dropdown), this would look like: Looking between the two, the tabs example clearly associates the content area with the tab where-as the dropdown will only inform the user of an option selected which seems like a potentially inoperable experience as the user may not know how to navigate to the part of the page that they are changing. |
Related: #2551 |
The left/right arrows really help this interaction too. The scrolling tabs without any indicators could easily be over looked (like on google) but this youtube example seems a lot better. Plus it give you a click target if you're not on a touch screen and can't easily swipe. |
Proposal Triage Meeting, January 21st 2020 Next Steps
|
Designs for responsive tabsStatus: Ready for dev 🤖 Interactions
Default tabsIn content / grid alignmentContainer tabsIn content / grid alignment |
@aagonzales is this supposed to show at a specific window size, or is it always available? |
Always available, basically whenever overflow would happen. |
@aagonzales What are the Keyboard Interactions for this new design? Some things to think about:
|
Any ETA on release for this update? Would like to plan ahead to prepare for any updates I need to do in my code. |
Hey @gptt916! 👋 No immediate updates plan, we will try and share any changes to this in our monthly planning issues that we pin in the issues tab 👀 |
just want to confirm: this spec is finalized to replace dropdown tabs and is ready for dev? |
Yes, it its good to go @emyarod |
Hi @aagonzales and @emyarod, please consider if the Carbon implementation would include consideration of different widths of the tab. For example, on the storybook, I see currently a Tab has width about 160px. A Tabs component of 800px wide may fit say 4 tabs. If the Tabs component has narrower width like 600px, the scrollable tabs may be enabled and show say 3 tabs at a time. When user clicks on the right arrow, it would show the next 3 tabs or so. |
I believe the topic of responsive tab widths has come up previously so I will defer to decision around that to @aagonzales, but in the meantime as a workaround, tab widths can be modified via CSS |
@gracelo essentially as long as each tab is the same width as each other and has at least 16px of padding on the right then the width of the tabs can be any size. We know tabs width has some problems currently and we are looking into it. |
As this is the expected behaviour for responsive tabs - could/should the current behaviour where the tab is switched out to a dropdown be marked as deprecated. We use the carbon design system but have our own component implementation and almost went ahead and implemented the current responsive tab behaviour in our own component - before luckily stumbling across this |
I searched the WAI ARIA Best Practices, I could not find any guidance on responding to more narrow (phone width) views for Responsive Tabs (or any other component). I did notice an issue raised with the W3C working group, but not yet in their implementation milestone plan: Its not clear to me where the Mobile and Responsive is on the working groups agenda. But keyboard operation needs to be addressed, designed, and documented.
|
@aagonzales We have a tabbed interface in our application where the the text in each tab is based on user data (as is the number of tabs displayed). Currently each tab takes up as much space as it needs meaning each tab is most likely a different width to the others. When there is not enough screen real estate we start collapsing them longest first until that is the width of the next longest at which point that one starts collapsing as well and so on. This is obviously not in line with the scrolling interface specified above. You also define the behavior of the tabs to be Select on Enter key press. Currently all of our tabs are automatically activated, i.e. activated when the user uses the arrow key as per the example linked to from here - https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel. Is that still acceptable? If so, should the design spec be reworded to accommodate this? |
@aagonzales On a windows machine the scrollbars are more prominent than on a Mac, are we supposed to hide the default scrollbar that the user would see when there is insufficient space to render all the tab elements? There are an awful lot of caveats about styling scrollbars - https://caniuse.com/#feat=css-scrollbar. |
Proposal Accepted
Design spec: #4758 (comment)
Original issue
Currently, our tab components render in the following way by default:
When the browser screen width gets smaller, it then turns into a dropdown:
There are a couple of issues with this approach, namely:
This issue is to decide on potentially two things:
Some operational things we'd need to do:
Related
The text was updated successfully, but these errors were encountered: