[Accessibility] Fix focus order on checkout block page (#49649)
* Render total blocks before fields on checkout * Reverse checkout total blocks position on desktop * Add changelog file * Add conditional styles to reverse checkout blocks order --------- Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
This commit is contained in:
parent
ce98e51430
commit
c9aa65a22f
|
@ -4,6 +4,10 @@
|
|||
margin: 0 auto $gap;
|
||||
position: relative;
|
||||
|
||||
&:has(> :last-child.wp-block-woocommerce-checkout-fields-block) {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.wc-block-must-login-prompt {
|
||||
display: block;
|
||||
}
|
||||
|
|
|
@ -86,8 +86,8 @@ export const Edit = ( {
|
|||
}, [ clientId ] );
|
||||
|
||||
const defaultTemplate = [
|
||||
[ 'woocommerce/checkout-fields-block', {}, [] ],
|
||||
[ 'woocommerce/checkout-totals-block', {}, [] ],
|
||||
[ 'woocommerce/checkout-fields-block', {}, [] ],
|
||||
] as TemplateArray;
|
||||
|
||||
const toggleAttribute = ( key: keyof Attributes ): void => {
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
align-items: flex-start;
|
||||
padding-left: 5px;
|
||||
|
||||
&:has(> :first-child.wp-block-woocommerce-checkout-totals-block) {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.wc-block-checkout__additional_fields {
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,11 @@
|
|||
flex-wrap: wrap;
|
||||
margin: 0 auto $gap;
|
||||
position: relative;
|
||||
|
||||
&:has(> :last-child.wp-block-woocommerce-checkout-fields-block) {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.wp-block-woocommerce-checkout-totals-block {
|
||||
width: 35%;
|
||||
padding-left: math.percentage(math.div($gap-large, 1060px));
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Fix focus order on checkout block page.
|
Loading…
Reference in New Issue