Skip to content

Commit

Permalink
Refactor: Remove Tooltip component for better a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshbhutkar committed Jan 10, 2025
1 parent 5817076 commit 641649e
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import {
__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,
__experimentalUnitControl as UnitControl,
Tooltip,
} from '@wordpress/components';
import { __ } from '@wordpress/i18n';

Expand Down Expand Up @@ -68,23 +67,21 @@ export default function BoxInputControls( {
: selectedUnits[ corner ] || selectedUnits.flat;

return (
<Tooltip
text={ label }
placement="top"
key={ corner }
<div
className="components-border-radius-control__tooltip-wrapper"
key={ corner }
>
<UnitControl
{ ...props }
aria-label={ label }
label={ label }
value={ [ parsedQuantity, computedUnit ].join(
''
) }
onChange={ createHandleOnChange( corner ) }
onUnitChange={ createHandleOnUnitChange( corner ) }
size="__unstable-large"
/>
</Tooltip>
</div>
);
} ) }
</div>
Expand Down

0 comments on commit 641649e

Please sign in to comment.