Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #51 from Financial-Times/bump-o-forms-version
Browse files Browse the repository at this point in the history
bump to o-forms v5
  • Loading branch information
leggsimon authored Nov 9, 2018
2 parents efdbd78 + 7e72450 commit b670640
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 36 deletions.
36 changes: 15 additions & 21 deletions .pa11yci.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,43 @@
const viewports = [
{
width: 768,
height: 1024
height: 1024,
},
{
width: 490,
height: 732
height: 732,
},
{
width: 320,
height: 480
}
height: 480,
},
];

const urls = [
'http://localhost:5005/',
'http://localhost:5005/core'
];
const urls = ['http://localhost:5005/', 'http://localhost:5005/core'];

const config = {
defaults: {
page: {
headers: {
'Cookie': 'next-flags=ads:off,cookieMessage:off; secure=true'
}
headers: {
Cookie: 'next-flags=ads:off,cookieMessage:off; secure=true',
},
timeout: 25000,
rules: ['Principle1.Guideline1_3.1_3_1_AAA']
rules: ['Principle1.Guideline1_3.1_3_1_AAA'],
},
urls: []
urls: [],
};

for (const viewport of viewports) {
for (const url of urls) {

const path = `${url.substring(url.lastIndexOf('/'))}@${viewport.width}x${viewport.height}`;
const path = `${url.substring(url.lastIndexOf('/'))}@${
viewport.width
}x${viewport.height}`;

config.urls.push({
url: url,
page: {
viewport: viewport
},
screenCapture: `./pa11y_screenCapture/${path}.png`
viewport,
screenCapture: `./pa11y_screenCapture/${path}.png`,
});
}
};
}

module.exports = config;
8 changes: 5 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
"public"
],
"dependencies": {
"n-ui-foundations": "^2.5.0",
"o-buttons": "^5.7.0",
"o-forms": "^4.0.3",
"o-header-services": "^2.0.1",
"o-colors": "^4.1.4"
"o-colors": "^4.1.4",
"o-forms": "^5.7.2"
},
"devDependencies": {
"n-ui-foundations": "^v3.0.0"
}
}
8 changes: 4 additions & 4 deletions drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
<div class="header__drawer-form-container">
<div class="o-forms licence-switcher__form">
<form action="{{basePath}}licenceSwitch" method="POST" class="o-forms__affix-wrapper">
<label for="licenceSwitcherDrawer" class="n-util-visually-hidden o-normalise-visually-hidden">Licences</label>
<label for="licenceSwitcherDrawer" class="o-normalise-visually-hidden">Licences</label>
<select id="licenceSwitcherDrawer" name="licenceSelection" class="o-forms__select">
{{#each @root.licenceList}}
<option value="{{licenceId}}" {{#ifEquals licenceId @root.LICENCE_ID }}selected="true" {{/ifEquals}}>{{contractId}} - {{name}}</option>
{{/each}}
</select>
<div class="o-forms__suffix n-util-hide-js n-ui-hide-js">
<div class="o-forms__suffix n-ui-hide-js">
<button type="submit" class="licence-switcher__submit">Go To Licence</button>
</div>
</form>
Expand All @@ -38,7 +38,7 @@
<a class="o-header__drawer-menu-link o-header__drawer-menu-link--{{#if selected}}selected{{else}}unselected{{/if}}" href="{{href}}"
{{#if trackable}}data-trackable={{trackable}}{{/if}}>
{{~ name ~}} {{#if selected}}
<span class="n-util-visually-hidden o-normalise-visually-hidden"> Current page.</span>{{/if}}</a>
<span class="o-normalise-visually-hidden"> Current page.</span>{{/if}}</a>
</li>
{{/if}}
{{else}}
Expand All @@ -48,7 +48,7 @@
<a class="o-header__drawer-menu-link o-header__drawer-menu-link--{{#if selected}}selected{{else}}unselected{{/if}}" href="{{href}}"
{{#if trackable}}data-trackable={{trackable}}{{/if}}>
{{~ name ~}} {{#if selected}}
<span class="n-util-visually-hidden o-normalise-visually-hidden"> Current page.</span>{{/if}}</a>
<span class="o-normalise-visually-hidden"> Current page.</span>{{/if}}</a>
</li>
{{/ifAll}}
{{/if}}
Expand Down
10 changes: 5 additions & 5 deletions header.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ <h1 class="o-header-services__product-name">{{ nav.heading }}</h1>
<span class="o-header-services__related-content-link">
<div class="o-forms licence-switcher__form">
<form action="{{basePath}}licenceSwitch" method="POST" class="o-forms__affix-wrapper">
<label for="licenceSwitcher" class="n-util-visually-hidden o-normalise-visually-hidden">Licences</label>
<label for="licenceSwitcher" class="o-normalise-visually-hidden">Licences</label>
<select id="licenceSwitcher" name="licenceSelection" class="o-forms__select">
{{#each @root.licenceList}}
<option value="{{licenceId}}" {{#ifEquals licenceId @root.LICENCE_ID }}selected="true"{{/ifEquals}}>{{contractId}} - {{name}}</option>
{{/each}}
</select>
<div class="o-forms__suffix n-util-hide-js n-ui-hide-js">
<button type="submit" class="licence-switcher__submit">Go To Licence</button>
<div class="o-forms__suffix n-ui-hide-js">
<button type="submit" class="licence-switcher__submit o-buttons o-buttons--big">Go To Licence</button>
</div>
</form>
</div>
Expand All @@ -41,7 +41,7 @@ <h1 class="o-header-services__product-name">{{ nav.heading }}</h1>
<a class="o-header-services__nav-link {{#if selected}}o-header-services__nav-link--selected{{/if}}" href="{{href}}"
{{#if trackable}}data-trackable={{trackable}}{{/if}}>
{{~ name ~}}
{{#if selected}}<span class="n-util-visually-hidden o-normalise-visually-hidden"> Current page.</span>{{/if}}</a>
{{#if selected}}<span class="o-normalise-visually-hidden"> Current page.</span>{{/if}}</a>
</li>
{{/if}}
{{else}}
Expand All @@ -51,7 +51,7 @@ <h1 class="o-header-services__product-name">{{ nav.heading }}</h1>
<a class="o-header-services__nav-link {{#if selected}}o-header-services__nav-link--selected{{/if}}" href="{{href}}"
{{#if trackable}}data-trackable={{trackable}}{{/if}}>
{{~ name ~}}
{{#if selected}}<span class="n-util-visually-hidden o-normalise-visually-hidden"> Current page.</span>{{/if}}</a>
{{#if selected}}<span class="o-normalise-visually-hidden"> Current page.</span>{{/if}}</a>
</li>
{{/ifAll}}
{{/if}}
Expand Down
3 changes: 1 addition & 2 deletions main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ $o-forms-is-silent: false;
}

.licence-switcher__submit {
@include oButtons();
color: oColorsGetPaletteColor('claret');
@include oButtons(big, primary);
}

.header__drawer-form-container {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"nodemon": "^1.12.1",
"npm-prepublish": "^1.2.3",
"origami-build-tools": "^6.2.5",
"pa11y-ci": "^1.3.0",
"pa11y-ci": "^2.1.1",
"sass-lint": "^1.12.1"
},
"scripts": {
Expand Down

0 comments on commit b670640

Please sign in to comment.