File tree Expand file tree Collapse file tree 5 files changed +8
-9
lines changed
assets/js/blocks/checkout/inner-blocks/checkout-fields-block
packages/components/form-step Expand file tree Collapse file tree 5 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 33 */
44import type { ReactElement } from 'react' ;
55import clsx from 'clsx' ;
6+ import { __ } from '@wordpress/i18n' ;
67import { Main } from '@woocommerce/base-components/sidebar-layout' ;
78import { useStoreEvents } from '@woocommerce/base-context/hooks' ;
89import { useEffect } from '@wordpress/element' ;
@@ -27,6 +28,7 @@ const FrontendBlock = ( {
2728 return (
2829 < Main className = { clsx ( 'wc-block-checkout__main' , className ) } >
2930 < form
31+ aria-label = { __ ( 'Checkout' , 'woocommerce' ) }
3032 className = { clsx (
3133 'wc-block-components-form wc-block-checkout__form' ,
3234 {
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ interface StepHeadingProps {
1717const StepHeading = ( { title, stepHeadingContent } : StepHeadingProps ) => (
1818 < div className = "wc-block-components-checkout-step__heading" >
1919 < Title
20- aria-hidden = "true"
2120 className = "wc-block-components-checkout-step__title"
2221 headingLevel = "2"
2322 >
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ exports[`FormStep fieldset legend should default to legend prop when title and l
1414 className = " wc-block-components-checkout-step__heading"
1515 >
1616 <h2
17- aria-hidden = " true"
1817 className = " wc-block-components-title wc-block-components-checkout-step__title"
1918 >
2019 Lorem Ipsum
@@ -64,7 +63,6 @@ exports[`FormStep should remove step number CSS class if prop is false 1`] = `
6463 className = " wc-block-components-checkout-step__heading"
6564 >
6665 <h2
67- aria-hidden = " true"
6866 className = " wc-block-components-title wc-block-components-checkout-step__title"
6967 >
7068 Lorem Ipsum
@@ -135,7 +133,6 @@ exports[`FormStep should render a fieldset with heading if a title is provided 1
135133 className = " wc-block-components-checkout-step__heading"
136134 >
137135 <h2
138- aria-hidden = " true"
139136 className = " wc-block-components-title wc-block-components-checkout-step__title"
140137 >
141138 Lorem Ipsum
@@ -167,7 +164,6 @@ exports[`FormStep should render step description 1`] = `
167164 className = " wc-block-components-checkout-step__heading"
168165 >
169166 <h2
170- aria-hidden = " true"
171167 className = " wc-block-components-title wc-block-components-checkout-step__title"
172168 >
173169 Lorem Ipsum
@@ -204,7 +200,6 @@ exports[`FormStep should render step heading content 1`] = `
204200 className = " wc-block-components-checkout-step__heading"
205201 >
206202 <h2
207- aria-hidden = " true"
208203 className = " wc-block-components-title wc-block-components-checkout-step__title"
209204 >
210205 Lorem Ipsum
@@ -243,7 +238,6 @@ exports[`FormStep should set disabled prop to the fieldset element when disabled
243238 className = " wc-block-components-checkout-step__heading"
244239 >
245240 <h2
246- aria-hidden = " true"
247241 className = " wc-block-components-title wc-block-components-checkout-step__title"
248242 >
249243 Lorem Ipsum
Original file line number Diff line number Diff line change 1+ Significance: patch
2+ Type: fix
3+
4+ Improve checkout page accessibility after removing heading level 1.
Original file line number Diff line number Diff line change 1212 *
1313 * @see https://woocommerce.com/document/template-structure/
1414 * @package WooCommerce\Templates
15- * @version 3.5 .0
15+ * @version 9.4 .0
1616 */
1717
1818if ( ! defined ( 'ABSPATH ' ) ) {
2929
3030?>
3131
32- <form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url ( wc_get_checkout_url () ); ?> " enctype="multipart/form-data">
32+ <form name="checkout" method="post" class="checkout woocommerce-checkout" action="<?php echo esc_url ( wc_get_checkout_url () ); ?> " enctype="multipart/form-data" aria-label=" <?php echo esc_attr__ ( ' Checkout ' , ' woocommerce ' ); ?> " >
3333
3434 <?php if ( $ checkout ->get_checkout_fields () ) : ?>
3535
You can’t perform that action at this time.
0 commit comments