[WIP][Accessibility] Fix inline documentation typos in woocommerce-blocks (#50737)
* Fix inline documentation typos in woocommerce-blocks * Add changelog file * Add changefile(s) from automation for the following project(s): woocommerce-blocks, woocommerce * Remove original changelog --------- Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Mike Jolley <mike.jolley@me.com>
This commit is contained in:
parent
47386e18c2
commit
d7783511ff
|
@ -118,7 +118,7 @@ export const Block = ( props: Props ): JSX.Element | null => {
|
|||
};
|
||||
|
||||
export default ( props: Props ) => {
|
||||
// It is necessary because this block has to support serveral contexts:
|
||||
// It is necessary because this block has to support several contexts:
|
||||
// - Inside `All Products Block` -> `withProductDataContext` HOC
|
||||
// - Inside `Products Block` -> Gutenberg Context
|
||||
// - Inside `Single Product Template` -> Gutenberg Context
|
||||
|
|
|
@ -60,7 +60,7 @@ const Edit = ( {
|
|||
<div
|
||||
{ ...blockProps }
|
||||
/**
|
||||
* If block is decendant of the All Products block, we don't want to
|
||||
* If block is descendant of the All Products block, we don't want to
|
||||
* apply style here because it will be applied inside Block using
|
||||
* useColors, useTypography, and useSpacing hooks.
|
||||
*/
|
||||
|
|
|
@ -43,7 +43,7 @@ const Edit = ( {
|
|||
<div
|
||||
{ ...blockProps }
|
||||
/**
|
||||
* If block is decendant of the All Products block, we don't want to
|
||||
* If block is descendant of the All Products block, we don't want to
|
||||
* apply style here because it will be applied inside Block using
|
||||
* useColors, useTypography, and useSpacing hooks.
|
||||
*/
|
||||
|
|
|
@ -18,7 +18,7 @@ interface BlockErrorBase {
|
|||
*/
|
||||
text?: React.ReactNode | undefined;
|
||||
/**
|
||||
* Text preceeding the error message.
|
||||
* Text preceding the error message.
|
||||
*/
|
||||
errorMessagePrefix?: string | undefined;
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ interface BlockErrorBase {
|
|||
*/
|
||||
button?: React.ReactNode;
|
||||
/**
|
||||
* Controls wether to show the error block or fail silently
|
||||
* Controls whether to show the error block or fail silently
|
||||
*/
|
||||
showErrorBlock?: boolean;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ export interface PriceSliderProps {
|
|||
*/
|
||||
step?: number;
|
||||
/**
|
||||
* Wheter we're in the editor or not.
|
||||
* Whether we're in the editor or not.
|
||||
*/
|
||||
isEditor?: boolean;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import { isError } from '@woocommerce/types';
|
|||
* kept up to date with the collection matching that query in the store state.
|
||||
*
|
||||
* @throws {Object} Throws an exception object if there was a problem with the
|
||||
* API request, to be picked up by BlockErrorBoundry.
|
||||
* API request, to be picked up by BlockErrorBoundary.
|
||||
*
|
||||
* @param {Object} options An object declaring the various
|
||||
* collection arguments.
|
||||
|
|
|
@ -63,7 +63,7 @@ describe( 'Testing Query State Hooks', () => {
|
|||
* arguments.
|
||||
*
|
||||
* @param {Function} hookTested The hook being tested to use in the
|
||||
* test comopnent.
|
||||
* test component.
|
||||
* @param {Array} propKeysForArgs An array of keys for the props that
|
||||
* will be used on the test component that
|
||||
* will have values fed to the tested
|
||||
|
|
|
@ -212,7 +212,7 @@ const ActiveFiltersBlock = ( {
|
|||
] );
|
||||
|
||||
/**
|
||||
* Parse the filter URL to set the active rating fitlers.
|
||||
* Parse the filter URL to set the active rating filters.
|
||||
* This code should be moved to Rating Filter block once it's implemented.
|
||||
*/
|
||||
useEffect( () => {
|
||||
|
|
|
@ -142,7 +142,7 @@ const useLockedChildren = ( {
|
|||
|
||||
const clientId = targetNode.dataset.block;
|
||||
const isLocked = isBlockLocked( clientId );
|
||||
// Prevent the keyboard event from propogating if it supports locking.
|
||||
// Prevent the keyboard event from propagating if it supports locking.
|
||||
if ( isLocked ) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
|
@ -63,7 +63,7 @@ export const __internalSetRedirectUrl = ( redirectUrl: string ) => ( {
|
|||
/**
|
||||
* Set whether the checkout has an error or not
|
||||
*
|
||||
* @param hasError Wether the checkout has an error or not
|
||||
* @param hasError Whether the checkout has an error or not
|
||||
*/
|
||||
export const __internalSetHasError = ( hasError = true ) => ( {
|
||||
type: types.SET_HAS_ERROR,
|
||||
|
|
|
@ -153,7 +153,7 @@ describe( 'buildTermsTree', () => {
|
|||
] );
|
||||
} );
|
||||
|
||||
test( 'should return a tree of items, with orphan categories appended to the end, with children of thier own', () => {
|
||||
test( 'should return a tree of items, with orphan categories appended to the end, with children of their own', () => {
|
||||
const filteredList = [
|
||||
{ id: 1, name: 'Apricots', parent: 0 },
|
||||
{ id: 3, name: 'Elderberry', parent: 2 },
|
||||
|
|
|
@ -21,7 +21,7 @@ const directiveParser = new RegExp(
|
|||
// segments. It excludes underscore intentionally to prevent confusion.
|
||||
// E.g., "custom-directive".
|
||||
'([a-z0-9]+(?:-[a-z0-9]+)*)' +
|
||||
// (Optional) Match '--' followed by any alphanumeric charachters. It
|
||||
// (Optional) Match '--' followed by any alphanumeric characters. It
|
||||
// excludes underscore intentionally to prevent confusion, but it can
|
||||
// contain multiple hyphens. E.g., "--custom-prefix--with-more-info".
|
||||
'(?:--([a-z0-9_-]+))?$',
|
||||
|
|
|
@ -103,12 +103,12 @@ function processObjWithInnerKeys( obj ) {
|
|||
* not disabled. So adding { color: 'link' } support also brings along
|
||||
* background and text.
|
||||
*
|
||||
* @param {Object} supports - keys supported by blokc
|
||||
* @param {Object} supports - keys supported by block
|
||||
* @return {Object} supports augmented with defaults
|
||||
*/
|
||||
function augmentSupports( supports ) {
|
||||
if ( supports && 'color' in supports ) {
|
||||
// If backgroud or text is not specified (true or false)
|
||||
// If background or text is not specified (true or false)
|
||||
// then add it as true.a
|
||||
if (
|
||||
typeof supports.color === 'object' &&
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<!-- Configs -->
|
||||
<!--
|
||||
It shoudld match the minimum WP version supported by WooCommerce Core
|
||||
It should match the minimum WP version supported by WooCommerce Core
|
||||
(see https://github.com/woocommerce/woocommerce-blocks/blob/trunk/.github/release-initial-checklist.md#initial-preparation)
|
||||
-->
|
||||
<config name="minimum_supported_wp_version" value="6.3" />
|
||||
|
|
|
@ -2723,7 +2723,7 @@ This release fixes an error that some users experienced when their site automati
|
|||
|
||||
- Fix - Ensure empty categories are correctly hidden in the product categories block. ([3765](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3765))
|
||||
- Fix - Added missing wrapper div within FeaturedCategory and FeatureProduct blocks. ([3746](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3746))
|
||||
- Fix - Set correct text color in BlockErrorBoundry notices. ([3738](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3738))
|
||||
- Fix - Set correct text color in BlockErrorBoundary notices. ([3738](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3738))
|
||||
- Hidden cart item meta data will not be rendered in the Cart and Checkout blocks. ([3732](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3732))
|
||||
- Fix - Improved accessibility of product image links in the products block by using correct aria tags and hiding empty image placeholders. ([3722](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3722))
|
||||
- Add missing aria-label for stars image in the review-list-item component. ([3706](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3706))
|
||||
|
|
|
@ -35,7 +35,7 @@ module.exports = {
|
|||
},
|
||||
// webpackFinal field was added in following PR: https://github.com/woocommerce/woocommerce-blocks/pull/7514
|
||||
// This fixes "storybook build issue" related to framer-motion library.
|
||||
// Solution is from this commment: https://github.com/storybookjs/storybook/issues/16690#issuecomment-971579785
|
||||
// Solution is from this comment: https://github.com/storybookjs/storybook/issues/16690#issuecomment-971579785
|
||||
webpackFinal: async ( config ) => {
|
||||
config.module.rules.push( {
|
||||
test: /\.mjs$/,
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: tweak
|
||||
Comment: Fix inline documentation typos in woocommerce-blocks.
|
||||
|
Loading…
Reference in New Issue