Skip to content

Commit 7f0ffbb

Browse files
author
Oleg Zinoviev
committed
MAGETWO-39999: Hints behave not user-friendly on Storefront
- Better accessibility & QA
1 parent 1fa337a commit 7f0ffbb

File tree

7 files changed

+40
-17
lines changed

7 files changed

+40
-17
lines changed

app/code/Magento/Authorizenet/view/frontend/web/template/payment/authorizenet-directpost.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
<button data-role="review-save"
5555
type="submit"
5656
data-bind="
57-
attr: {title: $t('Place order')},
57+
attr: {title: $t('Place Order')},
5858
enable: (getCode() == isChecked()),
5959
click: placeOrder,
6060
css: {disabled: !isPlaceOrderActionAllowed()}
6161
"
6262
class="action primary checkout"
6363
disabled>
64-
<span data-bind="text: $t('Place order')"></span>
64+
<span data-bind="text: $t('Place Order')"></span>
6565
</button>
6666
</div>
6767
</div>

app/code/Magento/Payment/view/frontend/web/template/payment/cc-form.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,20 @@
9999
<span><!-- ko text: $t('Card Verification Number')--><!-- /ko --></span>
100100
</label>
101101
<div class="control _with-tooltip">
102-
<input type="number" autocomplete="off" class="input-text cvv" name="payment[cc_cid]" value=""
103-
data-bind="attr: {id: getCode() + '_cc_cid', title: $t('Card Verification Number'), 'data-container': getCode() + '-cc-cvv', 'data-validate': JSON.stringify({'required-number':true, 'validate-card-cvv':'#' + getCode() + '_cc_type'})},
104-
enable: isActive($parents),
105-
value: creditCardVerificationNumber"/>
102+
<input type="number"
103+
autocomplete="off"
104+
class="input-text cvv"
105+
name="payment[cc_cid]"
106+
value=""
107+
data-bind="attr: {id: getCode() + '_cc_cid',
108+
title: $t('Card Verification Number'),
109+
'data-container': getCode() + '-cc-cvv',
110+
'data-validate': JSON.stringify({'required-number':true, 'validate-card-cvv':'#' + getCode() + '_cc_type'})},
111+
enable: isActive($parents),
112+
value: creditCardVerificationNumber" />
106113
<div class="field-tooltip toggle">
107114
<span class="field-tooltip-action action-cvv"
115+
tabindex="0"
108116
data-toggle="dropdown"
109117
data-bind="attr: {title: $t('What is this?')}, mageInit: {'dropdown':{'activeClass': '_active'}}">
110118
<span><!-- ko text: $t('What is this?')--><!-- /ko --></span>

app/code/Magento/Payment/view/frontend/web/template/payment/iframe.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
<div class="actions-toolbar" id="review-buttons-container">
3030
<div class="primary">
3131
<button data-role="review-save" type="submit"
32-
data-bind="attr: {title: $t('Place order')}"
32+
data-bind="attr: {title: $t('Place Order')}"
3333
class="button action primary checkout">
34-
<span data-bind="text: $t('Place order')"></span>
34+
<span data-bind="text: $t('Place Order')"></span>
3535
</button>
3636
<button type="submit" id="originalPlaceOrder" class="hidden"
3737
data-bind="click: originalPlaceOrder($parents[1])"></button>

app/code/Magento/Paypal/view/frontend/web/template/payment/payflowpro-form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@
5454
<button data-role="review-save"
5555
type="submit"
5656
data-bind="
57-
attr: {title: $t('Place order')},
57+
attr: {title: $t('Place Order')},
5858
enable: (getCode() == isChecked()),
5959
click: placeOrder,
6060
css: {disabled: !isPlaceOrderActionAllowed()}
6161
"
6262
class="action primary checkout"
6363
disabled>
64-
<span data-bind="text: $t('Place order')"></span>
64+
<span data-bind="text: $t('Place Order')"></span>
6565
</button>
6666
</div>
6767
</div>

app/code/Magento/Shipping/view/frontend/web/template/checkout/shipping/shipping-policy.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<div class="shipping-policy-block field-tooltip"
88
data-bind="visible: config.isEnabled">
99
<span class="field-tooltip-action"
10+
tabindex="0"
1011
data-toggle="dropdown"
1112
data-bind="mageInit: {'dropdown':{'activeClass': '_active'}}">
1213
<!-- ko text: $t('See our Shipping Policy') --><!-- /ko -->

app/code/Magento/Ui/view/frontend/web/templates/form/element/helper/tooltip.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,21 @@
55
*/
66
-->
77
<div class="field-tooltip toggle">
8+
9+
<!-- ko if: (tooltip.link)-->
810
<a class="field-tooltip-action action-help"
911
target="_blank"
1012
data-toggle="dropdown"
1113
data-bind="attr: {href: tooltip.link}, mageInit: {'dropdown':{'activeClass': '_active'}}"></a>
14+
<!-- /ko -->
15+
16+
<!-- ko if: (!tooltip.link)-->
17+
<span class="field-tooltip-action action-help"
18+
tabindex="0"
19+
data-toggle="dropdown"
20+
data-bind="mageInit: {'dropdown':{'activeClass': '_active'}}"></span>
21+
<!-- /ko -->
22+
1223
<div class="field-tooltip-content"
1324
data-target="dropdown">
1425
<!-- ko text: tooltip.description --><!-- /ko -->

app/design/frontend/Magento/blank/Magento_Checkout/web/css/source/module/checkout/_tooltip.less

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,11 @@
3737
& when (@media-common = true) {
3838

3939
.field-tooltip {
40+
cursor: pointer;
4041
position: absolute;
4142
right: 0;
4243
top: 1px;
4344

44-
&:hover {
45-
cursor: pointer;
46-
}
47-
4845
&._active {
4946
.css(z-index, @checkout-tooltip__hover__z-index);
5047

@@ -68,9 +65,15 @@
6865
@_icon-font-color-active: false
6966
);
7067

71-
&._active {
72-
&:before {
73-
.css(color, @checkout-tooltip-icon__hover__color);
68+
&:focus {
69+
._keyfocus & {
70+
.css(z-index, @checkout-tooltip__hover__z-index);
71+
+ .field-tooltip-content {
72+
display: block;
73+
}
74+
&:before {
75+
.css(color, @checkout-tooltip-icon__hover__color);
76+
}
7477
}
7578
}
7679
}

0 commit comments

Comments
 (0)