@financial-times/n-myft-ui 34.0.0 → 34.0.2
Sign up to get free protection for your applications and to get access to all the features.
package/.toolkitstate/ci.json
CHANGED
@@ -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-
|
28
|
+
data-name="{{name}}"
|
28
29
|
{{#if alternateText}}
|
29
30
|
data-alternate-text="{{alternateText}}"
|
30
31
|
{{else}}
|
@@ -27,7 +27,7 @@
|
|
27
27
|
color: oColorsByName('black-80');
|
28
28
|
}
|
29
29
|
&::before {
|
30
|
-
@include oIconsContent('notifications', oColorsByName('black-60'), $icon-width, $iconset-version: 1);
|
30
|
+
@include oIconsContent('mute-notifications', oColorsByName('black-60'), $icon-width, $iconset-version: 1);
|
31
31
|
left: auto;
|
32
32
|
right: 1px;
|
33
33
|
margin-top: -18px;
|