Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

mdTabs: Should the the pagination arrows change tabs? #1247

Closed
PaulMougel opened this issue Jan 21, 2015 · 22 comments
Closed

mdTabs: Should the the pagination arrows change tabs? #1247

PaulMougel opened this issue Jan 21, 2015 · 22 comments

Comments

@PaulMougel
Copy link
Contributor

On a mobile display, if tab labels are long, it is pretty common to display only one tab at a time:
image
In that case, I have found disturbing that clicking on the arrow doesn't actually select the next (or previous) tab, but only changes the pagination. I understand the goal of this feature, however I wonder if it is a strict design requirement. The design specification states:

Scrollable tabs display a subset of tabs at any given moment, and can contain longer tab labels and a larger number of tabs. They are best used for browsing contexts in touch interfaces when users don’t need to directly compare the tab labels.

To navigate between scrollable tabs, touch the tab, swipe the tabs left or right, or swipe the content area left or right.

It doesn't mention using the arrow buttons to navigate between tab pagination. In that case, can it be an option? md-pagination-arrows="paginate" or md-pagination-arrows="changeTab" for instance?

Can anyone shed some light on this issue?

@ThomasBurleson
Copy link
Contributor

The functionality was originally based on aspects of keyboard focus changes vs. tab selection:

Left/Right arrows will change the focus to the previous/next tab without changing the currently selected tab. If arrow-key past page bounds, then change page and the focus on correct tab (without changing the current selection).

I think, however, if a user CLICKs on the pagintator then the

  • page should change,
  • focus should change
  • AND the selected tab should change.

This would be similar to a left-right swipe to navigation/select the next or previous tab.

@marcysutton
Copy link
Contributor

@ThomasBurleson agreed that a mouse click on an arrow should probably change the tab. I seem to remember we discussed keeping the arrow buttons out of the tab order because a keyboard/screen reader user would just cycle through ALL of the tabs (showing content panels requires space bar). But the arrow buttons currently have tabIndex="0" on them (probably from ngAria) along with aria-hidden="true", making them focusable mystery controls. Tabindex should probably be -1 to pull them out of the tab order, if that was the goal. Then we can do whatever we want on arrow click in regards to changing tabs and tab content.

@ThomasBurleson
Copy link
Contributor

@marcysutton - 👍

@davidohalloran
Copy link

Would be nice if the tabs list just scrolled in a similar fashion to how the polymer paper tabs work https://www.polymer-project.org/components/paper-tabs/demo.html.

@tam3r
Copy link

tam3r commented Jan 22, 2015

@davidohalloran I agree, tabs scroll the same way in Google Play Store and Play Music for that matter.

@marcysutton
Copy link
Contributor

I love this discussion. Taking inspiration from our favorite UI's is a great idea, particularly where the Material Design spec doesn't cover it. A quick glance at the spec for tabs showed no pagination on mobile, so unless there's an update to that part of the spec coming soon, we're on our own.

@PaulMougel
Copy link
Contributor Author

Awesome.
I agree with what you all said earlier: a mouse click / touch on an arrow should change the tab, while pressing the left/right arrow keys should change the pagination, without changing tab.

@davidohalloran I find the scrollable tabs of polymer a bit weird in that regard: I have to maintain the click a little bit longer than usual for the tabs to scroll, otherwise nothing happens.

@davidohalloran
Copy link

@PaulMougel I disagree that the arrow should change the tab mainly because a user will not know what the next tab contains as its label is hidden by the current pagination implementation. I think that is why the polymer team and play teams went with the ability to scroll through the tabs labels. The ability to scroll/swipe through the labels also has the advantage of letting the user quickly switch between say the second last tab in a long list and the first tab without the expense of hitting every other tab content panel along the way.

@robertmesserle
Copy link
Contributor

As @davidohalloran mentioned, I think the main argument for not changing the tab on click is that if we do that, there's no way to see the tabs without changing content. I don't really think it matters if it's triggered by keyboard or mouse, the idea is the same.

@PaulMougel
Copy link
Contributor Author

I see what you mean. However, clicking on an arrow focuses the first (or last) tab of the page, which is good for keyboard navigation, but weird on the eye.
See this screenshot for instance:
image
Doesn't it look like the current tab is Tab Five? Even if this is exacerbated due to #1260, to me it looks like Tab Five is displayed. But it is not: Tab One is displayed, and I just clicked on the arrow to display the next page. See this gif.

@robertmesserle
Copy link
Contributor

@PaulMougel this is a good point, and in terms of being less confusing, seems to support the Polymer approach. (The Polymer approach also more closely mimics how we would expect pagination to work on mobile, being able to freely drag the tabs from side to side rather than in a forced pagination.)

@ThomasBurleson
Copy link
Contributor

@robertmesserle, @PaulMougel - My summary is that clicks imply a selection (which is more than a focus-only change):

  • click tabs change the selected tab.
  • click paginator changes the selected tab (first tab on next page, or last tab on previous page).

@robertmesserle
Copy link
Contributor

@ThomasBurleson I don't think that I agree with that. A click on the right arrow, to me, implies changing the page - not selecting a tab that I haven't seen yet. The issue is that if we force a new selection, there's no way for the user to know what they are selecting until after they've already done it.

@davidohalloran
Copy link

@ThomasBurleson a click can only imply a selection when the user knows what they are selecting.

@ThomasBurleson
Copy link
Contributor

@robertmesserle - But if you click to change the page now you see a different set of Tabs yet the current cotent is associated with an offscreen tab. It is this disconnect of UX that seems off to me.

@ThomasBurleson
Copy link
Contributor

Summary 2:

The difference between the Polymer and Angular Tab scrolling is that Angular scrolls by Pages (ie 1...n Tabs) while Polymer scrolls by individual Tab buttons (current scroll by pixels but that is a bug).

@PaulMougel
Copy link
Contributor Author

@ThomasBurleson Note that the Google Play native app allows the user to swipe across tabs without selecting them. And it allows to scroll "by pixels", if I understand what you mean by that.

@davidohalloran
Copy link

@ThomasBurleson what is the benefit of grouping the tabs into pages vs a scroll behaviour? Would it be possible to add an option to disable pagination completely and let the developer add scrolling using CSS.

@robertmesserle
Copy link
Contributor

@ThomasBurleson This is true - I don't think that either is ideal. However, keyboard navigation puts you in the same boat, so I don't see why the two would be treated differently.

@ThomasBurleson
Copy link
Contributor

@robertmesserle - my point [based on community feedback] is that both the keyboard and clicks should be consistent (at least with pagination). If the page set changes, perhaps the selection auto-changes.
Perhaps we have an attribute md-select-on-pagination which is false by default.... (just brainstorming here).

@robertmesserle
Copy link
Contributor

I agree that they should be consistent (earlier in the thread, there was differentiation between click and keyboard functionality). I spoke with @jelbourn earlier and have some ideas for how we could best handle this. Will discuss later.

@davidohalloran
Copy link

@ThomasBurleson @robertmesserle any updates on how this might evolve in the near future?

@robertmesserle robertmesserle modified the milestones: 0.9.0, 0.8.0-rc1 Feb 4, 2015
robertmesserle added a commit that referenced this issue Mar 17, 2015
Closes #1850
Closes #1698
Closes #1570
Closes #1564
Closes #1518
Closes #1516
Closes #1506
Closes #1505
Closes #1403
Closes #1387
Closes #1380
Closes #1261
Closes #1247
Closes #1140
@ajoslin ajoslin added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Mar 17, 2015
robertmesserle added a commit that referenced this issue Mar 18, 2015
Closes #1850
Closes #1698
Closes #1570
Closes #1564
Closes #1518
Closes #1516
Closes #1506
Closes #1505
Closes #1403
Closes #1387
Closes #1380
Closes #1261
Closes #1247
Closes #1140
robertmesserle added a commit that referenced this issue Mar 19, 2015
Closes #1850
Closes #1698
Closes #1570
Closes #1564
Closes #1518
Closes #1516
Closes #1506
Closes #1505
Closes #1403
Closes #1387
Closes #1380
Closes #1261
Closes #1247
Closes #1140
Closes #1626
@ajoslin ajoslin removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs resolution: fixed labels Mar 19, 2015
robertmesserle added a commit that referenced this issue Mar 19, 2015
Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1626
Closes #1698
Closes #1850
robertmesserle added a commit that referenced this issue Mar 19, 2015
Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1626
Closes #1698
Closes #1777
Closes #1850
robertmesserle added a commit that referenced this issue Mar 19, 2015
Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1850
robertmesserle added a commit that referenced this issue Mar 19, 2015
Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1850
robertmesserle added a commit that referenced this issue Mar 20, 2015
Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1788
Closes #1850
Closes #1959
robertmesserle added a commit that referenced this issue Mar 20, 2015
Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1788
Closes #1850
Closes #1959
Closes #1986
robertmesserle added a commit that referenced this issue Mar 24, 2015
BREAKING CHANGE: Generated HTML structure has changed, so custom styles
will need to be updated to match the new HTML structure.

Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1788
Closes #1850
Closes #1959
Closes #1986
robertmesserle added a commit that referenced this issue Mar 24, 2015
BREAKING CHANGE: Generated HTML structure has changed, so custom styles
will need to be updated to match the new HTML structure.

Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1788
Closes #1850
Closes #1959
Closes #1986
robertmesserle added a commit that referenced this issue Mar 25, 2015
BREAKING CHANGE: Generated HTML structure has changed, so custom styles
will need to be updated to match the new HTML structure.

Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1788
Closes #1850
Closes #1959
Closes #1986
robertmesserle added a commit that referenced this issue Mar 25, 2015
BREAKING CHANGE: Generated HTML structure has changed, so custom styles
will need to be updated to match the new HTML structure.

Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1788
Closes #1850
Closes #1959
Closes #1986
Closes #2020
robertmesserle added a commit that referenced this issue Mar 26, 2015
BREAKING CHANGE: Generated HTML structure has changed, so custom styles
will need to be updated to match the new HTML structure.

Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1788
Closes #1850
Closes #1959
Closes #1986
Closes #2020
robertmesserle added a commit that referenced this issue Mar 26, 2015
BREAKING CHANGE: Generated HTML structure has changed, so custom styles
will need to be updated to match the new HTML structure.

Bugs fixed:
Closes #1087
Closes #1107
Closes #1140
Closes #1247
Closes #1261
Closes #1380
Closes #1387
Closes #1403
Closes #1443
Closes #1505
Closes #1506
Closes #1516
Closes #1518
Closes #1564
Closes #1570
Closes #1620
Closes #1626
Closes #1698
Closes #1777
Closes #1788
Closes #1850
Closes #1959
Closes #1986
Closes #2020

Pull Request:
Closes #1944
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants