Skip to content

[Feature] tabindex attribute on the button #648

Open
@mandicOfisl

Description

@mandicOfisl

🚀 Feature Proposal

tabindex attribute for the PayPal button.

Motivation

Very often the visual and HTML order of elements on the page do not match. It could be something as simple as reordering the elements with CSS, or we just want to make a more meaningful tabbing order.
Current implementation offers the role="link" element with the tabindex="0", and it can't be changed even with JS because it's in an <iframe> and it throws a Cross-Origin error.

Example

The usage would be just adding another attribute to the <PayPalButtons> component:

<PayPalButtons createOrder={onCreatePayPalOrder} onApprove={onPayPalApprove} tabindex="3" />

or, for non-React way:

window.paypal.Buttons({ style: { label: "paypal", }, message: { amount: 100, }, tabindex: "3", ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions