@financial-times/n-myft-ui 34.0.1 → 35.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "branch": "",
3
3
  "repo": "n-myft-ui",
4
- "version": "4e19155b865ac3d6d4c3cf10285f267c44dfa940",
5
- "tag": "v34.0.1"
4
+ "version": "4d2e9522b7d651b9d8e80ce8eb6f9a90a3f80ff0",
5
+ "tag": "v35.0.0"
6
6
  }
@@ -27,7 +27,14 @@ function toggleButton (buttonEl, state) {
27
27
 
28
28
  if (state !== isPressed) {
29
29
  nextButtons.toggleState(buttonEl);
30
+ const name = buttonEl.getAttribute('data-name');
31
+ if (isPressed) {
32
+ buttonEl.setAttribute('aria-label', 'Alerts ' + name + ' currently disabled, change to enable');
33
+ } else {
34
+ buttonEl.setAttribute('aria-label', 'Alerts ' + name + ' currently enabled, change to disable');
35
+ }
30
36
  }
37
+
31
38
  buttonEl.removeAttribute('disabled');
32
39
  buttonEl.setAttribute('value', !state);
33
40
  }
@@ -13,10 +13,11 @@
13
13
  <input type="hidden" value="http://www.ft.com/ontology/concept/Concept" name="directType">
14
14
  {{/if}}
15
15
  <button
16
- aria-label="Get instant alerts for {{name}}"
17
16
  {{#ifAll hasInstantAlert @root.cacheablePersonalisedUrl}}
17
+ aria-label="Alerts {{name}} currently enabled, change to disable"
18
18
  aria-pressed="true"
19
19
  {{else}}
20
+ aria-label="Alerts {{name}} currently disabled, change to enable"
20
21
  aria-pressed="false"
21
22
  {{/ifAll}}
22
23
  class="n-myft-ui__button
@@ -24,7 +25,7 @@
24
25
  {{#size}} n-myft-ui__button--{{this}}{{/size}}
25
26
  n-myft-ui__button--instant
26
27
  n-myft-ui__button--instant-light"
27
- data-alternate-label="Stop instant alerts for {{name}}"
28
+ data-name="{{name}}"
28
29
  {{#if alternateText}}
29
30
  data-alternate-text="{{alternateText}}"
30
31
  {{else}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/n-myft-ui",
3
- "version": "34.0.1",
3
+ "version": "35.0.0",
4
4
  "description": "Client side component for interaction with myft",
5
5
  "main": "server.js",
6
6
  "scripts": {
@@ -113,6 +113,7 @@
113
113
  "@financial-times/o-overlay": "^4.0.0",
114
114
  "@financial-times/o-spacing": "^3.0.0",
115
115
  "@financial-times/o-tooltip": "^5.2.4",
116
+ "next-myft-client": "^12.2.0",
116
117
  "n-ui-foundations": "^9.0.0 || ^10.0.0",
117
118
  "react": "^17.0.2"
118
119
  },
@@ -122,7 +123,6 @@
122
123
  "form-serialize": "^0.7.2",
123
124
  "ftdomdelegate": "^4.0.6",
124
125
  "js-cookie": "^2.2.1",
125
- "next-myft-client": "^12.0.1",
126
126
  "next-session-client": "^4.0.0",
127
127
  "ready-state": "^2.0.5",
128
128
  "superstore-sync": "^2.1.1"