-
Notifications
You must be signed in to change notification settings - Fork 2
SL-346: add accessibility improvements for EAA compliance #320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
justelis22
merged 28 commits into
SL-358/payment-field
from
SL-346/accessibility-eaa-compliance
Jul 9, 2026
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
a766c17
feat: add accessibility improvements for EAA compliance
54c05a0
fix(a11y): add aria-label to mobile switches and tab triggers
04934a5
fix(a11y): improve color contrast for WCAG 2.1 AA compliance
2da0b7d
fix(a11y): add aria-label to hosted field style combobox
baca7a3
fix(a11y): add focus trap to log details modal
3456d45
fix(a11y): improve contrast on SaferpayOfficial admin order buttons
a78459d
fix(a11y): add scope=col to saved cards table headers
ce8d69f
fix(a11y): improve Remove link contrast on saved cards table
634beca
revert(a11y): drop PS theme contrast overrides
3476949
fix: prevent silent save with empty or invalid API credentials
07ba05d
fix: hide Saferpay Fields section per active environment license
efbf236
Merge pull request #322 from Invertus/BUGFIX/disable-save-empty-crede…
TLabutis 0fd7498
Merge pull request #323 from Invertus/BUGFIX/saferpay-fields-env-lice…
TLabutis 5338eea
fix: break out of SaferPay iframe on payment status redirect
b558f03
fix: use location.replace and guard window.top access
b94589a
BUGFIX: payment methods default to all countries/currencies and dropd…
216b7a0
Merge pull request #326 from Invertus/BUGFIX/payment-methods-all-rest…
TLabutis e0570d9
Merge pull request #325 from Invertus/BUGFIX/iframe-redirect-top-window
TLabutis 20263c3
BUGFIX: redirect customer to cart instead of order history after Safe…
bb3e081
BUGFIX: clarify Hosted field style info banner to mention Custom form…
9147de8
Merge branch 'SL-346/accessibility-eaa-compliance' into BUGFIX/abort-…
TLabutis 1319947
Merge pull request #327 from Invertus/BUGFIX/abort-redirect-secure-key
TLabutis bfab294
Merge pull request #328 from Invertus/BUGFIX/clarify-hosted-field-sty…
TLabutis 7743a2d
BUGFIX: validate Merchant Emails field on save
1c5f676
Merge pull request #329 from Invertus/BUGFIX/merchant-emails-validation
TLabutis 15841de
BUGFIX: ensure 3DS-fail behavior overrides default payment behavior
60d1e5a
BUGFIX: de-duplicate ApiRequest error logs
e1959fd
Merge remote-tracking branch 'origin/SL-358/payment-field' into SL-34…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,17 +21,65 @@ | |
| */ | ||
|
|
||
| $(document).ready(function () { | ||
| function closeModal($modal) { | ||
| $modal.removeClass('open'); | ||
| var triggerButton = $modal.data('triggerButton'); | ||
| if (triggerButton) { | ||
| triggerButton.focus(); | ||
| } | ||
| } | ||
|
|
||
| $('.log-modal-overlay').on('click', function (event) { | ||
| $('.modal.open').removeClass('open'); | ||
| closeModal($(this).closest('.modal')); | ||
| event.preventDefault(); | ||
| }); | ||
|
|
||
| $('.js-log-modal-close').on('click', function (event) { | ||
| closeModal($(this).closest('.modal')); | ||
| event.preventDefault(); | ||
| }); | ||
|
|
||
| $(document).on('keydown', function (event) { | ||
| var $openModal = $('.modal.open'); | ||
| if (!$openModal.length) { | ||
| return; | ||
| } | ||
| if (event.key === 'Escape') { | ||
| closeModal($openModal); | ||
| event.preventDefault(); | ||
| return; | ||
| } | ||
| if (event.key === 'Tab') { | ||
| var focusables = $openModal.find('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])').filter(':visible'); | ||
| if (!focusables.length) { | ||
| event.preventDefault(); | ||
| return; | ||
| } | ||
| var first = focusables.first()[0]; | ||
| var last = focusables.last()[0]; | ||
| if (event.shiftKey && document.activeElement === first) { | ||
| last.focus(); | ||
| event.preventDefault(); | ||
| } else if (!event.shiftKey && document.activeElement === last) { | ||
| first.focus(); | ||
| event.preventDefault(); | ||
| } else if (!$openModal[0].contains(document.activeElement)) { | ||
| first.focus(); | ||
| event.preventDefault(); | ||
| } | ||
| } | ||
|
Comment on lines
+42
to
+70
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }); | ||
|
|
||
| $('.js-log-button').on('click', function (event) { | ||
| var logId = $(this).data('log-id'); | ||
| var informationType = $(this).data('information-type'); | ||
| var $modal = $('#' + $(this).data('target')); | ||
|
|
||
| $modal.data('triggerButton', $(this)); | ||
|
|
||
| // NOTE: opening modal | ||
| $('#' + $(this).data('target')).addClass('open'); | ||
| $modal.addClass('open'); | ||
| $modal.find('.js-log-modal-close').focus(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| // NOTE: if information has been set already we don't need to call ajax again. | ||
| if (!$('#log-modal-' + logId + '-' + informationType + ' .log-modal-content-data').hasClass('hidden')) { | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
closeModalfunction correctly handles closing the modal and returning focus to the trigger button. This is a crucial accessibility pattern for modal dialogs, ensuring keyboard users can easily navigate back to their previous context.