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

Add footer component #569

Merged
merged 12 commits into from
Mar 8, 2018
Merged

Add footer component #569

merged 12 commits into from
Mar 8, 2018

Conversation

NickColley
Copy link
Contributor

@NickColley NickColley commented Mar 1, 2018

👉link: https://govuk-frontend-review.herokuapp.com/components/footer

New version of the GOV.UK Footer based off the work done in the GOV.UK Design System.

Notable changes

  • Macro interface that supports custom navigation and meta navigation.
  • B.E.M.
  • Uses flexbox for sizing sections
  • Uses 'columns' for splitting the footer list (potential accessibility improvement)
  • Uses inline SVG for OGL logo (can be see in inverse)
  • Changes OGL logo from duplicate link to presentational element.
  • Copyright crest has touch area that is more appropriate.

Testing

Inverse colours ✅ screen shot 2018-03-05 at 17 12 49
Cross browser testing ✅

Known issues:

  • Note that some of the older browser have centered crest logo, this is now left aligned to fix an issue and section break. Has been tested with my eyes but not re-screenshotted.
IE8 ie8 top ie8 bottom

Fixed (html5 shiv):

fixed ie8 top fixed ie8 bottom
IE9 ie9 top ie9 bottom
IE11 (IE10 looks similar) ie11
Edge edge
Windows, Chrome windows chrome
Windows, Firefox windows firefox
Mac, Safari mac safari
Mac, Chrome mac chrome
Mac, Firefox mac firefox
iPhone 6s iphone 6s

After fix:
iphone 6s

iPhone X iphonex top iphonex bottom
Android, Chrome android chrome top android chrome bottom
Android, Firefox android firefox top android firefox bottom
Windows phone windows phone

After fix:
windows phone after fix


Operating system Browser Tested
Windows Internet Explorer 8-10 ✅ Windows 7, IE 8 - 10
Internet Explorer 11 ✅ Windows 7, IE 11
Edge (latest versions) ✅ Windows 10, Edge 16
Google Chrome (latest versions) ✅ Windows 10, Chrome 64
Mozilla Firefox (latest versions) ✅ Windows 10, Firefox 58
macOS Safari 9+ ✅ macOS High Sierra, Safari 11- macOS El Capitan, Safari 9.1
Google Chrome (latest versions) ✅ macOS High Sierra, Chrome 61
Mozilla Firefox (latest versions) ✅ macOS High Sierra, Firefox 57
iOS Safari 9.3+ ✅ iPhone 6S, iOS 9, Safari - iPhone 6, iOS 8, Safari - iPhone 7, iOS 10, Safari
Google Chrome (latest versions) ✅(see Safari iPhone 6s) iPhone 6s, iOS 8, Chrome
Android Mozilla Firefox (latest versions) ✅ Samsung Galaxy S8, Firefox
Google Chrome (latest versions) ✅ Samsung Galaxy S8, Chrome
Windows Phone Internet Explorer (latest versions) ✅ Windows Phone, Lumia 930 8.1
Assistive technology testing ✅(see notes below)
Software Version Type Browser Tested
JAWS 15 or later screen reader Internet Explorer 11 ✅Jaws 18 works fine, Jaws 17, Jaws 16, Jaws 15
ZoomText 10.11 or later screen magnifier Internet Explorer 11 ✅Right most column could be missed, however underlines in headings could help lead people but that's not guaranteed.
Dragon NaturallySpeaking 11 or later speech recognition Internet Explorer 11 ✅Clicking on links and images works
NVDA 2016 or later screen reader Mozilla Firefox (latest versions) ✅headings can be read out, lists are announced as expected, images have accessible names, passes criteria
VoiceOver n/a screen reader Safari 10 (or higher) on Mac OS X 10.10, and iOS 10.3 (or higher) ✅headings and lists can be tabbed through and make sense.

Accessibility questions

  1. Should the lists be associated with their headings?: This seems to be a pattern used with navigation roles so will avoid this for now and go with how it currently works.
  2. Should the footer use role=contentinfo? Or just the meta section (http://www.brucelawson.co.uk/2013/why-does-html-take-rolecontentinfo/): Yes, top level, explained in accessibility criteria.
  3. Should the navigation use a navigation role? I know Leonie has warned in the past about too many navigation landmarks: No, explained in accessibility criteria.
  4. Should change aria-hidden on OGL icon to role=presentation?: Decided to make this change.

Accessibility notes

When tabbing through on IE11, 'All content is avaliable text' span is tabbable, this happens with and without Jaws 18. Does not read out as a link, but just text so does not feel like a barrier but might be worth investigating.

As part of https://trello.com/c/hSF9zpJP/241-3-fe-footer-component

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 1, 2018 19:00 Inactive
@36degrees
Copy link
Contributor

Nice! This is looking really good so far 💯 👍

@NickColley
Copy link
Contributor Author

@dashouse this component uses non-standard greys, is this an exception? Should we iterate this so it doesnt have it's own custom colours later?

@dashouse
Copy link

dashouse commented Mar 2, 2018

Mainly the colour of text? The background is an existing colour?

Agreed, probably something to iterate later as it's the same as the Design System and GOV.UK

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 13:00 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 13:50 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:02 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:05 Inactive

.govuk-c-footer__copyright-logo {
display: block;
min-width: 125px; // Based on the govuk-crest-2x.png image width: 250px/2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that these numbers appear in a number of places with comments, it might be a good idea to break them out into variables:

.govuk-c-footer__copyright-logo {
  // Dimensions of the crest image at retina resolution
  $crest-image-width: 125px;
  $crest-image-height: 102px;

  display: block;
  min-width: $crest-image-width;
  // ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good shout

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:06 Inactive
{% endfor %}
</ul>
{% endif %}
<svg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth trying to see if this can be optimised – a quick play with http://petercollingridge.appspot.com/svg-optimiser suggests we can shave a few hundred bytes off this.

Copy link
Contributor Author

@NickColley NickColley Mar 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I've already optimised it, those bytes could be from putting it on a single line which I figured is whitespace that'll get GZIPed but I'll double check.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the extra savings come from the whitespace

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:09 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:13 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:27 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:28 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:29 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:41 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:48 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 5, 2018 14:49 Inactive
@joelanman
Copy link
Contributor

This seems to have different breakpoints to whats currently on GOV.UK, is that ok? GOV.UK goes to a single column quite quickly as you make the browser narrower.

Copy link
Contributor

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me @NickColley! 💯
Happy to approve it anytime, but I'll wait for the initial reviewers to take a look too.

I have only one question: shall we try and put in more accessibility on the SVG (I think it's the first inline SVG in the library)? I was thinking of having a <title> and maybe even a <description> for more complex SVGs; and maybe bind them to the <svg> with aria-labelledby to extend the number of ATs that are using them. It doesn't seem to bring much value for our OGL, which is already explained in the next element, but more of a thought about inline SVGs in general.

@NickColley
Copy link
Contributor Author

@joelanman that's intentional, flexbox allows for more granular reflow.

@NickColley
Copy link
Contributor Author

@alex-ju the SVG is presentational so any additional properties would not be exposed to users of assistive technologies.

Definitely agree if we use SVGs inline that are not presentational we should take extra care to do as you've described.

Copy link
Member

@hannalaakso hannalaakso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great, thanks @NickColley.

Something we noticed earlier today was the poor contrast between the link colour and the hover state link colour. I didn't actually realise the colour changed the first time I tried it! Might be worth @dashouse having a look.

None of my comments should be considered blocking though (the hover colour issue mainly because the same issue exists on the current GOV.UK footer).

@include mq ($until: tablet) {
padding-bottom: $govuk-spacing-scale-2;
}
border-bottom: 1px solid $govuk-footer-border;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading bottom border doesn't currently exist on GOV.UK footer on mobile (see screen grab). This might have been a design decision though? I think it's possibly an improvement on the existing thing.

screen shot 2018-03-07 at 14 50 21

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured that was a mistake so wanted to make the new version more consistent.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's cool. It does look better now compared to the current slightly bunched up mobile view 👍

Copy link
Contributor Author

@NickColley NickColley Mar 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank @dashouse's patented spacing scale 🌈

Note: This decision has been made given that most uses of this role tend to be used directly on a `<footer>` element.
Assumption made is that is most predictable for users of assistive technologies.
The spec indicates that `contentinfo` is useful for "Examples of information included in this region of the page are copyrights and links to privacy statements.", which may indicate that it might be better placed around the 'meta' section of this component.
Should be challenged if user research indicates this is an issue.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure there's a good explanation for this but I'm not clear why the accessibility criteria are in the YAML file?

👍 for adding them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagined eventually we'd want to expose these somewhere, either in the README, Design System or Review application.

For now it's in the yaml.

@joelanman
Copy link
Contributor

I think it might be safest to proceed with the same column/breakpoint logic as currently exists. In this PR you can end up with some odd column width ratios, that don't fit our grid, for example:

image

@NickColley
Copy link
Contributor Author

@joelanman I'll see if I can make it 1:1 at tablet.

- uses columns CSS3 feature to avoid multiple lists
Used when you want to make the footer full width
Adds a break between navigation and the rest of the footer
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-review-pr-569 March 7, 2018 15:35 Inactive
@NickColley
Copy link
Contributor Author

@joelanman updated based on your feedback, looks more balanced and less chaotic now 👍

responsive-footer-update

Copy link
Contributor Author

@NickColley NickColley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add a changelog entry before merging.

Copy link
Contributor

@joelanman joelanman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from a design point of view - needs a code review

@NickColley
Copy link
Contributor Author

NickColley commented Mar 7, 2018

Spoke to @amyhupe, I've made some updates based on an initial conversation.

We're going to noodle on the content for the accessibility acceptance criteria, but can be updated later since this guidance is not exposed anywhere to users yet.

Includes decisions made that can be challenged
https://www.w3.org/TR/wai-aria-1.1/#contentinfo)

Note: This decision has been made given that most uses of this role tend to be used directly on a `<footer>` element.
Assumption made is that is most predictable for users of assistive technologies.

The spec indicates that `contentinfo` is useful for "Examples of information included in this region of the page are copyrights and links to privacy statements.", which may indicate that it might be better placed around the 'meta' section of this component.
    Should be challenged if user research indicates this is an issue.
Copy link
Contributor

@alex-ju alex-ju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code reviewed.

@NickColley NickColley merged commit 0bca6b9 into master Mar 8, 2018
@NickColley NickColley deleted the add-footer-component branch March 8, 2018 09:59
@NickColley NickColley mentioned this pull request Mar 8, 2018
@hannalaakso hannalaakso mentioned this pull request Mar 13, 2018
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants