mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Merge pull request #3294 from woocommerce/PCP-4277-conduct-an-accessibility-audit-and-compile-a-list-of-tasks-to-improve-the-accessibility-of-the-new-ui
Enhance the accessibility of the new Settings UI (4277)
This commit is contained in:
commit
a362780c8e
14 changed files with 268 additions and 58 deletions
|
@ -31,10 +31,15 @@ const PaymentMethodItemBlock = ( {
|
|||
id={ paymentMethod.id }
|
||||
className={ methodItemClasses }
|
||||
separatorAndGap={ false }
|
||||
aria-disabled={ isDisabled ? 'true' : 'false' }
|
||||
>
|
||||
{ isDisabled && (
|
||||
<div className="ppcp--method-disabled-overlay">
|
||||
<p className="ppcp--method-disabled-message">
|
||||
<div
|
||||
className="ppcp--method-disabled-overlay"
|
||||
role="alert"
|
||||
aria-live="polite"
|
||||
>
|
||||
<p className="ppcp--method-disabled-message" tabIndex="0">
|
||||
{ disabledMessage }
|
||||
</p>
|
||||
</div>
|
||||
|
@ -60,6 +65,8 @@ const PaymentMethodItemBlock = ( {
|
|||
__nextHasNoMarginBottom
|
||||
checked={ isSelected }
|
||||
onChange={ onSelect }
|
||||
disabled={ isDisabled }
|
||||
aria-label={ `Enable ${ paymentMethod.itemTitle }` }
|
||||
/>
|
||||
{ hasWarning && ! isDisabled && isSelected && (
|
||||
<WarningMessages
|
||||
|
@ -70,7 +77,9 @@ const PaymentMethodItemBlock = ( {
|
|||
{ paymentMethod?.fields && onTriggerModal && (
|
||||
<Button
|
||||
className="ppcp--method-settings"
|
||||
disabled={ isDisabled }
|
||||
onClick={ onTriggerModal }
|
||||
aria-label={ `Configure ${ paymentMethod.itemTitle } settings` }
|
||||
>
|
||||
<Icon icon={ cog } />
|
||||
</Button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue