Use hidden HTML element instead of .screen-reader-text for CSS class toggling helper texts (https://github.com/woocommerce/woocommerce-blocks/pull/4530)

This commit is contained in:
Niels Lange 2021-08-04 10:07:48 +02:00 committed by GitHub
parent 7f221ad7e2
commit b601055db4
3 changed files with 3 additions and 15 deletions

View File

@ -176,11 +176,7 @@ const ProductAttributeTermControl = ( {
isHierarchical
/>
{ !! onOperatorChange && (
<div
className={
selected.length < 2 ? 'screen-reader-text' : ''
}
>
<div hidden={ selected.length < 2 }>
<SelectControl
className="woocommerce-product-attributes__operator"
label={ __(

View File

@ -149,11 +149,7 @@ const ProductCategoryControl = ( {
isSingle={ isSingle }
/>
{ !! onOperatorChange && (
<div
className={
selected.length < 2 ? 'screen-reader-text' : ''
}
>
<div hidden={ selected.length < 2 }>
<SelectControl
className="woocommerce-product-categories__operator"
label={ __(

View File

@ -150,11 +150,7 @@ class ProductTagControl extends Component {
isHierarchical
/>
{ !! onOperatorChange && (
<div
className={
selected.length < 2 ? 'screen-reader-text' : ''
}
>
<div hidden={ selected.length < 2 }>
<SelectControl
className="woocommerce-product-tags__operator"
label={ __(