mirror of
https://github.com/jlengrand/adyen-web.git
synced 2026-03-10 08:01:22 +00:00
Prevent double readout of PM names, by a screenreader, in Dropin
This commit is contained in:
5
.changeset/honest-cherries-wash.md
Normal file
5
.changeset/honest-cherries-wash.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@adyen/adyen-web': patch
|
||||
---
|
||||
|
||||
Prevent double readout of PM names, by a screenreader, in Dropin.
|
||||
@@ -112,7 +112,12 @@ class PaymentMethodItem extends Component<PaymentMethodItemProps> {
|
||||
aria-hidden="true"
|
||||
/>
|
||||
|
||||
<PaymentMethodIcon altDescription={paymentMethod.props.name} type={paymentMethod.type} src={paymentMethod.icon} />
|
||||
<PaymentMethodIcon
|
||||
// Only add alt attribute to storedPaymentMethods (to avoid SR reading the PM name twice)
|
||||
{...(paymentMethod.props.oneClick && { altDescription: paymentMethod.props.name })}
|
||||
type={paymentMethod.type}
|
||||
src={paymentMethod.icon}
|
||||
/>
|
||||
|
||||
<PaymentMethodName
|
||||
displayName={paymentMethod.displayName}
|
||||
|
||||
Reference in New Issue
Block a user