alphagov / govuk-design-system-backlog

GOV.UK Design System Community Backlog
30 stars 2 forks source link

Tabs #100

Open govuk-design-system opened 6 years ago

govuk-design-system commented 6 years ago

Tabs

Use this issue to discuss this pattern in the GOV.UK Design System.

screen shot 2018-06-25 at 10 15 31

Contributors

Related components

Related links

timpaul commented 6 years ago

@adamsilver and @trevorsaint have very kindly agreed to develop this component, using their work on tabs in the Reform pattern library. The Sass and JavaScript for their tab component is available on GitHub.

timpaul commented 6 years ago

@adamsilver and @trevorsaint have reported that the original version of the component is being used successfully in the following services (amongst others):

Criminal Justice Services (CPP)

Judiciary UI internal systems (HMCTS)

Rural Payments (Defra)

timpaul commented 6 years ago

Tabs component criteria

Following 2 discussions with @adamsilver and @trevorsaint we've agreed that, in addition to meeting the Design System criteria, this component will meet the following additional criteria:

Coding criteria

The tabs component must:

Design criteria

The tabs component must:

Guidance criteria

The tabs component guidance must:

Research criteria

The component must have been tested with a representative range of users in a prototype or live service.

Accessibility criteria

The tabs component guidance must:

joelanman commented 6 years ago

I'm wondering if it's helpful to split this work into smaller chunks, something like:

  1. Visual design, HTML, guidance. The tabs are links to page where that tab is selected.
  2. JavaScript, ARIA (if needed), history API

I think 1. might be significantly easier to do, and easier to get through the process and deliver value quickly. We could then enhance it to 2.

timpaul commented 6 years ago

@trevorsaint and @adamsilver - what do you think? Would that help, or do you think that both chunks will be ready in good time?

adamsilver commented 6 years ago

We've already tackled all of those things now and we're close to finishing V1 (subject to crit etc).

joelanman commented 6 years ago

We just had a quick discussion about this on the team - to try and summarise (these are all just thoughts and not a steer in any particular direction):

It might be tricky to convey when teams should use version 1 (full page navigation, tabs link to content on separate pages) and version 2 (all content on one page, enhanced with javascript to switch between them).

Version 1 seems to be in wide use around government.

Version 1 is useful when the pages are quite large, and combining them in version 2 would mean users download a lot of data they don't necessarily need.

We need to be careful to only use ARIA on version 2, it would be incorrect on version 1.

timpaul commented 6 years ago

Following a productive discussion with @adamsilver and @trevorsaint we've agreed the following:

joelanman commented 6 years ago

Léonie Watson blog post on accessibility testing, including tabs via @accessiblewebuk

accessiblewebuk commented 6 years ago

Also of interest https://inclusive-components.design/tabbed-interfaces/

adamsilver commented 6 years ago

DWP using JS tabbed interfaces with research showing the need and proof of accessibility testing https://github.com/dwp/design-examples/tree/master/tabs

adamsilver commented 6 years ago

DWP draft guidance https://docs.google.com/document/d/1nalvO7QwNiSyX8aVYeM6U1iNtB9-UDMNNjsHFhS4u-U/edit#heading=h.u45atcpl9klz

adamsilver commented 6 years ago

These DWP internal services use tabbed panels with JS:

abbott567 commented 6 years ago

Probably worth mentioning on here that our stance on tabs at DWP was not to have both tabbed navigation and javascript tabs with the same styling. The reason being that if they look the same, the expected behaviour is the same, but it's not.

We opted to keep our tabs styling for the progressive enhanced version, and for our tabbed navigation, we are going to switch to a component with different styling. This way you don't see two things that look identical and have an inconsistent experience with how they work.

Also, the user need for having the JS tabs over the tabbed nav fell out of research we did on Bereavement, where our agents were getting disorientated. The tabs were a little way down the page, and when we used the non-js version it would pop them back to the top and they would lose their place.

We also tried doing it with anchor links to the ID's, but it never quite puts them back to the same place. It's still jarring, and it was creating unnecessary cognitive load to try and orientate themselves again.

adamsilver commented 6 years ago

Some of the Accordion guidance, I think, is relevant to Tabs.

https://paper.dropbox.com/doc/Accordions-4lnTjyNru2mN1XXjA1Xf3

adamsilver commented 6 years ago

Judicial case manager screenshots

With a cheeky example of sub nav too.

Big screens

image

Small screens

jui-prototype herokuapp com_app_case_bv18d00150_parties nexus 5x

adamsilver commented 6 years ago

Court Case Data Screenshots

Big screen

image

Small screen

image

adamsilver commented 6 years ago

Bank holiday screenshots

Big screen

image

Small screen

image

adamsilver commented 6 years ago

Find a charity uses tabbed panels

http://beta.charitycommission.gov.uk/charity-details/?regid=219830&subid=0

Big screens

image

Small screens (broken)

image

adamsilver commented 6 years ago

Find and compare schools screenshots

Big screens

image

Small screens (broken)

image

timpaul commented 6 years ago

Working group review session

This proposal was reviewed by a panel of designers from GDS, HMRC, DWP, EA and Home Office on the 24 of May 2018.

The panel agreed that the pattern should be published in the GOV.UK Design System.

The panel also made the following recommendations:

Before publication

After publication

adamsilver commented 6 years ago

Also, for after publication to have a variant where the panel is borderless (on the left, right and bottom).

steven-borthwick commented 6 years ago

We tend to use tabs solely for staff systems, agents at DWP have IE11. The grey background colour (#f8f8f8) for the inactive tabs doesn't display at all, whereas the darker grey does (#dee0e2) does display. See the screenshot from a Windows machine using IE11. tab_component

timpaul commented 6 years ago

The guidance and examples have now been updated, following the feedback from the working group. Thanks all for your help.

jbuller commented 5 years ago

How much as this been tested with low vision users? I'm suprised the difference beteween the selected and unselected tabs is so subtle, the matching title aside admittedly, but seeing both could be a challenge at high magnification

abbott567 commented 5 years ago

@jbuller we had the same concern. @steven-borthwick pointed it out a month ago that it also doesn’t show up on government machines so all the tabs are white. Must be because of the compression as the desktop is technically streamed. The tab pattern we developed in DWP had a darker grey background. It would be good if somebody from the design system team could update on this.

ignaciaorellana commented 5 years ago

Hi @abbott567 and @jbuller , thanks for your question and feedback. This component is currently marked as experimental because we know it needs more research and testing. We have used the research section in the component's guidance to describe known gaps, and we will add this issue as a point to further research. We will talk to the original contributors to see if they can help, and if not, we'll ask the community to help us do proper user research. If you have any research that you're able to contribute, it would be great if you could share some details here. @alex-ju has some comments about this, could you add them here? Many thanks :)

alex-ju commented 5 years ago

Indeed the light grey on non-active tabs is only slightly different than the white on selected tabs, but the idea was to differentiate using the border and the active state (yellow border) when interacting with it.

screen shot 2018-07-26 at 09 44 38

Our tests with IE11 (screen shot below) show the same slight difference.

screen shot 2018-07-26 at 10 04 47

Bottom line is that potential ways to improve the component will be to try a darker shade of grey or inactive tabs and/or potentially a thicker border.

abbott567 commented 5 years ago

@alex-ju I think the concern is that a lot of people won't realise these are clickable. The background only has a contrast ratio of 1.06:1 which is almost the same as the white. It maybe wouldn't be as much of an issue if the blue link style was used or the darker grey like in Steves example. But at the moment the other tabs look like body text to anyone with poor vision or poor equipment, rather than buttons or links.

fofr commented 5 years ago

Before switching to the design system we used a similar tab design but where the tab label was styled as a link, which tested well with our admin users:

screen shot 2018-08-08 at 11 13 42

If the tab text is styled as a link does this resolve some of the concerns around the grey?

joelanman commented 5 years ago

@fofr Not that this is a blocking comment to your suggestion, but just for context: I think originally it was to convey that these are not normally functioning links (they don't take you to another place on the page, or to another page) but instead act as tabs. I think this is probably up for discussion though. The link style certainly has clear affordance.

abbott567 commented 5 years ago

Just realised there is no hover state on any of the tabs. Will this not compound the problem with it looking like body text? Also, is it accessible to not have a hover state at all?

aug-18-2018 09-25-16

adamsilver commented 5 years ago

Given the thread so far, I suggest the next, simplest iteration would be:

image

Then, if that's not enough, we could change the colour:

image

Then, if that's not enough, we could look at:

ignaciaorellana commented 5 years ago

Hi, I hope this is the right place - I had promised to include the BBC tabs in out next user testing. Had a test with a relatively unskilled long-time blind (or nearly blind) iPhone user which I have uploaded here on Youtube: https://www.youtube.com/watch?v=6lVLHGOsylU I hope you can work out what happens without me translating the German captions...

This was original posted by @detlevhfischer in https://github.com/alphagov/govuk-design-system/issues/526

36degrees commented 5 years ago

For context, I believe @detlevhfischer's comment is related to this issue – https://github.com/alphagov/govuk_frontend_toolkit/issues/464#issue-336669953

Thanks!

timpaul commented 5 years ago

Here's a version of the same video with English language narration: https://accessuse.eu/en/tabbed-interfaces.html#govuk

detlevhfischer commented 5 years ago

@timpaul The video on https://accessuse.eu/en/tabbed-interfaces.html#govuk is actually not the same as the one I uploaded to youtube. It is an earlier stage (the user had not yet been told that he has to activate the tabs to open the respective panel, and develops his own strange mental model --- by counting). The video on YouTube https://www.youtube.com/watch?v=6lVLHGOsylU shows another sequence with the same user that followed after that.

amyhupe commented 5 years ago

Dropbox Paper audit

On 15 October 2018 the Design System team reviewed a Dropbox Paper document discussing the Tabs component.

The aim was to reduce the number of places containing guidance and code by:

Below is a record of the outcomes of that review.

If you need to, you can see the original Dropbox Paper content in the internet archive.

Review outcomes

Updates to the Design System

The Design System team will carry out the following updates to ensure that relevant, useful content from the Dropbox Paper file is added to the Design System.

abbott567 commented 5 years ago

Hi, does anybody know what's happening about the colour contrast on the tabs component? It was initially called out in June of last year, and it's still causing us issues 8 months later. We're still maintaining a DWP version of the tabs component with a WCAG-AA compliant contrast just so it shows up on Government equipment. It would be good to get some sort of indicator on the progress of this as it continues to be a pain to manage. Thanks.

dashouse commented 5 years ago

@abbott567 We're doing a large piece of work at the moment to meet WCAG 2.1 AA (so our users can by 23rd September 2019) - You can see what we're looking at here https://github.com/alphagov/govuk-design-system/issues/677

There's lots wrapped up in this from a colour contrast / broader colour palette perspective frontend wide but tabs will be a part of it.

abbott567 commented 5 years ago

Cool, thanks @dashouse 🙌

dizzyack commented 5 years ago

Trying to link from Tab1 to an anchor point on Tab2 but cant get it working, i can get the link to open Tab2 but not then scroll down to the anchor point i want, has anyone come across this before?

dashouse commented 5 years ago

@dizzyack Because the tabs use id's in the URL themselves, for example #tab-1, #tab-2 you won't be able to deep link from one tab to a particular part of another tab. The tab will always reset itself to the top of the screen so the user is made aware that the tab has changed and they are in a different section.

andymantell commented 4 years ago

The notes at the bottom of the page on the design system say:

User research is needed to confirm: that this approach to tabs is the best option for screen reader users and sighted keyboard users

Has anyone since observed these being used by the above type of user? There are those around the internet that claim the Aria tablist pattern is not a good one on the basis that users aren't aware they can use the arrow keys, and instead expect to be able to tab through them in the normal manner. It's always that tricky balance of complying with a recommendation from something like the Aria spec, vs what people are familiar with. For reference, see:

https://simplyaccessible.com/article/danger-aria-tabs/

There's plenty of material recommending the Aria/Arrow key approach, but most of them take the form of instructional articles on how to comply with the Aria spec, not backed up by any research.

Has anyone observed anything in any of their testing? We have not yet gone out to test this specifically - it got raised here by a tester who was unaware that the arrow keys could be used and was unable to use their keyboard to active the tabs (In effect, a very tiny bit of user research in itself! )

NickColley commented 4 years ago

We have a related link to that article in the original list of links for this backlog entry above.

Around the time that article was published Léonie Watson and some other accessibility folks published this:

I would welcome any more real user testing as always but just sharing this as it's relevant for the conversation.

andymantell commented 4 years ago

ok thanks Nick, that is a pretty strong rebuttal - I'll pass the information on. Obviously research is key, but there's enough there that I can help the team to feel comfortable with rejecting the issue that was raised.

simon-westcott commented 4 years ago

Tabs have been used and tested successfully on Help to Save. Currently in public Beta.

timpaul commented 3 years ago

Just an update on the previous conversation above about the contrast of unselected tabs.

We added underlines to the text, so users would understand that unselected tabs were clickable, even if they couldn't see the tab boundaries.

We believe that this meets the relevant success criterion of WCAG 2.1 (Non-text contrast) - but please let us know if you see it causing issues in user research.

image

armstrongb commented 3 years ago

@timpaul we've had the underlines on the tabs with a grey background in our component library for quite some time now and haven't had any reported issues in use.

hopebristow commented 3 years ago

We have used this pattern within check and pay for multiple vehicles as part of the Drive in a Clean Air Zone (https://www.gov.uk/clean-air-zones) service. Tabs allowed us to separate a grid which allows a user to select payment dates for multiple vehicles across 13 available payment dates. We found tabs to be the only successful way to display the many dates available for a user to select to pay for multiple vehicles. Other designs such as showing both grids on one screen caused confusing for users as there was too much information. Through usability testing, 122/136 users tested the tabs design and were able to use them independently and complete the task of selecting and paying for the vehicles and days.

image