Follow-up to #3522 / #3524, which fixed the Global Settings > Payments tabs only.
Broken: the gateway buttons (Stripe, Square, PayPal) in a payment form action use the same tab markup but were not covered. Arrow keys, Home/End and Space/Enter do nothing, and every label is a Tab stop.
Where:
stripe/views/action-settings/gateway-buttons.php:6-44: role="tablist" with label role="tab", fixed tabindex="0", aria-selected set once on page load.
stripe/js/frmtrans_admin.js:55: updates aria-selected on change, no keyboard handling.
Fix: reuse initTablistKeyboard() / syncTablistState() from js/src/admin/admin.js (added in #3524) on each gateway tablist, and give the labels a roving tabindex (0 on the checked one, -1 otherwise), same as payments.php. A form can have more than one payment action, so bind per action tablist. Ids already include the action number (gateway-buttons.php:19).
Depends on #3524 merging first.
Requested by: @Crabcyborg
Follow-up to #3522 / #3524, which fixed the Global Settings > Payments tabs only.
Broken: the gateway buttons (Stripe, Square, PayPal) in a payment form action use the same tab markup but were not covered. Arrow keys, Home/End and Space/Enter do nothing, and every label is a Tab stop.
Where:
stripe/views/action-settings/gateway-buttons.php:6-44:role="tablist"withlabel role="tab", fixedtabindex="0",aria-selectedset once on page load.stripe/js/frmtrans_admin.js:55: updatesaria-selectedon change, no keyboard handling.Fix: reuse
initTablistKeyboard()/syncTablistState()fromjs/src/admin/admin.js(added in #3524) on each gateway tablist, and give the labels a rovingtabindex(0on the checked one,-1otherwise), same aspayments.php. A form can have more than one payment action, so bind per action tablist. Ids already include the action number (gateway-buttons.php:19).Depends on #3524 merging first.
Requested by: @Crabcyborg