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

Changed Transaction Banner font size to match GOV Elements banner due… #781

Merged
merged 3 commits into from
Sep 18, 2017
Merged

Changed Transaction Banner font size to match GOV Elements banner due… #781

merged 3 commits into from
Sep 18, 2017

Conversation

CEPoole
Copy link
Contributor

@CEPoole CEPoole commented Jun 16, 2017

… to a colour contrast accessibility issue

DAC reports showed that the current transaction banner failed WCAG AAA colour contrast standards.

Problem

The font size of the <p> text </p> was too small for the colour contrast to pass accessibility standards.

Example Screenshot

LEFT: Assets frontend RIGHT: GOV Elements
image

Solution

Increased the font sizes to match those used in the GOV Elements kit

@@ -88,10 +88,17 @@ Styleguide Header.Transaction
text-align: left;
padding: 0;
}

p {
font-size: 36px;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you use the core-36 mixin instead of hard coding the font size here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahhh - I couldn't find "core" and "bold" was obviously the wrong choice. Thanks - I will update this now

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah you can find the core mixins here - https://github.com/hmrc/assets-frontend/blob/master/assets/govuk_frontend_toolkit/stylesheets/_typography.scss#L60
You can pass in a custom line height if you need to but I'd say leave at default unless you really need to.

@CEPoole
Copy link
Contributor Author

CEPoole commented Jun 16, 2017

Made that change to use the mixin, thanks @timsb

@gavinwye
Copy link
Contributor

@CEPoole did you consider adding this in as an additional style to match GOV Elements rather than replacing the current one?
I'm wondering if replacing the current one would have unexpected results for services when they upgrade their version of AF.

@CEPoole
Copy link
Contributor Author

CEPoole commented Jun 16, 2017

@gavinwye If you think that is better? I thought this would be an important change due to the fact it failed accessibility testing, is it right to let the default implementation fail WCAG 2.0 AA?

@gavinwye
Copy link
Contributor

@CEPoole I didn't realise this was for an accessibility fail. I don't think it should fail accessibility.

I'm thinking about the upgrade path for teams though. But I guess this would create a new version of AF so teams would need to bump their version to get this change.

@gordonmcmullan
Copy link
Contributor

@gavinwye @timsb @rpowis is everyone happy for this to be merged so we can release it?

@timsb
Copy link
Contributor

timsb commented Jun 26, 2017

@gordonmcmullan, @gavinwye and I moved this conversation out of the PR. I believe as it currently stands @CEPoole is making some changes to the PR so that it copies the GDS pattern more closely and he'll either edit this PR or open a new one.

@rpowis
Copy link
Contributor

rpowis commented Jul 20, 2017

@timsb @CEPoole what happened with this? does it copy the GDS pattern more closely now or is it still waiting for more amends?

@CEPoole can you add a link to the GDS version? I searched a few repos but couldn't find anything.

@adamliptrot-oc
Copy link
Contributor

@rpowis I think it's this one
https://github.com/alphagov/govuk_elements/blob/96c91fb5ba4818904f4bb0e10c81863b2503b8e7/packages/govuk-elements-sass/public/sass/elements/_components.scss
which is shown at the bottom of this page
https://govuk-elements.herokuapp.com/colour/
The fonts look to be just set via the toolkit classes rather than being from the component itself.

@rpowis
Copy link
Contributor

rpowis commented Jul 20, 2017

Thanks @adamliptrot-oc. That's an odd page for the example to be on. Anyway...

@CEPoole If you can add the GDS styles with their class name then we can mark ours as deprecated and teams can start adopting the new one. Is that what your conversation was about @timsb?

Anyone prefer an alternative approach?

@rpowis
Copy link
Contributor

rpowis commented Sep 14, 2017

Just spoke with @russellthorn about this and he's going to add some styles for the GOV.UK markup.

The AF markup will be deprecated by way of updating the component library to the design pattern library and the soon to be added GOV.UK styles can be removed in the upcoming dependencies update.

@russellthorn let us know on here if this PR should be merged or if you're able to add your stuff to it.

@russellthorn
Copy link

@rpowis the PR has been updated with GOV.UK styles and annotated in the comments. The new _components file has been imported into the elements main.scss.

Let me know if the change is OK. If it is and you're happy, fire away and merge! 👍

CHANGELOG.md Outdated
@@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed
- Added the correct class to the Tab component to enable targetting an open tab via the url with a fragment [#778](https://github.com/hmrc/assets-frontend/issues/778)
- Increased font size in transaction banner headers to match the GDS example banner to fix an accessibility issue [#781](https://github.com/hmrc/assets-frontend/pull/781)
Copy link
Contributor

Choose a reason for hiding this comment

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

Careful when rebasing this file. This entry needs moving up into the Unreleased section.

@rpowis
Copy link
Contributor

rpowis commented Sep 15, 2017

Looks good 👍 Thanks @CEPoole @russellthorn

Worth noting that the margins on the heading in the GOV.UK Elements version are bigger than those in the Assets Frontend version. Is that expected or should they be the same before this gets merged?

Top: assets-frontend markup
Bottom: govuk-elements markup

image

GOVUK Elements example

image

@russellthorn
Copy link

russellthorn commented Sep 18, 2017

The margins should be larger, that's fine and correct @rpowis 👍

Happy for this to be merged.

@rpowis
Copy link
Contributor

rpowis commented Sep 18, 2017

Great. Thanks for confirming @russellthorn 👍

@rpowis rpowis merged commit 7b221ae into hmrc:master Sep 18, 2017
hmrc-web-operations pushed a commit that referenced this pull request Sep 18, 2017
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.

7 participants