Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Use .hidden instead of .screen-reader-text for toggling helper texts #4530

Merged
merged 3 commits into from
Aug 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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={ __(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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={ __(
Expand Down
6 changes: 1 addition & 5 deletions assets/js/editor-components/product-tag-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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={ __(
Expand Down