RESOLVED FIXED 196661
AX: Automatically compute accessibility labels for Apple Pay buttons
https://bugs.webkit.org/show_bug.cgi?id=196661
Summary AX: Automatically compute accessibility labels for Apple Pay buttons
chris fleizach
Reported 2019-04-05 15:25:43 PDT
If a merchant doesn’t specify an aria-label on their Apple Pay buttons, WebKit should make a better effort at computing a good default accessibility label. For instance, it could take the -apple-pay-button-type CSS property into account to decide whether the button represents “buy”, “subscribe”, “book”, etc. <rdar://problem/49646423>
Attachments
patch (17.05 KB, patch)
2019-04-05 19:38 PDT, chris fleizach
ews-watchlist: commit-queue-
Archive of layout-test-results from ews103 for mac-highsierra (2.47 MB, application/zip)
2019-04-05 20:42 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews104 for mac-highsierra-wk2 (2.67 MB, application/zip)
2019-04-05 20:57 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews112 for mac-highsierra (2.26 MB, application/zip)
2019-04-05 21:25 PDT, EWS Watchlist
no flags
patch (18.38 KB, patch)
2019-04-06 19:09 PDT, chris fleizach
ews-watchlist: commit-queue-
Archive of layout-test-results from ews103 for mac-highsierra (2.47 MB, application/zip)
2019-04-06 20:13 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews107 for mac-highsierra-wk2 (2.62 MB, application/zip)
2019-04-06 20:27 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews117 for mac-highsierra (2.28 MB, application/zip)
2019-04-06 20:56 PDT, EWS Watchlist
no flags
patch (19.61 KB, patch)
2019-04-08 09:01 PDT, chris fleizach
ews-watchlist: commit-queue-
Archive of layout-test-results from ews100 for mac-highsierra (2.59 MB, application/zip)
2019-04-08 09:55 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.62 MB, application/zip)
2019-04-08 10:22 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews115 for mac-highsierra (2.39 MB, application/zip)
2019-04-08 10:42 PDT, EWS Watchlist
no flags
patch (19.78 KB, patch)
2019-04-08 12:12 PDT, chris fleizach
ews-watchlist: commit-queue-
Archive of layout-test-results from ews100 for mac-highsierra (2.86 MB, application/zip)
2019-04-08 13:09 PDT, EWS Watchlist
no flags
patch (20.75 KB, patch)
2019-04-08 13:56 PDT, chris fleizach
no flags
chris fleizach
Comment 1 2019-04-05 19:38:24 PDT
EWS Watchlist
Comment 2 2019-04-05 20:42:37 PDT
Comment on attachment 366868 [details] patch Attachment 366868 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11787746 New failing tests: accessibility/mac/apple-pay-labels.html
EWS Watchlist
Comment 3 2019-04-05 20:42:39 PDT
Created attachment 366871 [details] Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 4 2019-04-05 20:57:42 PDT
Comment on attachment 366868 [details] patch Attachment 366868 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11787759 New failing tests: accessibility/mac/apple-pay-labels.html
EWS Watchlist
Comment 5 2019-04-05 20:57:44 PDT
Created attachment 366873 [details] Archive of layout-test-results from ews104 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 6 2019-04-05 21:25:15 PDT
Comment on attachment 366868 [details] patch Attachment 366868 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11787780 New failing tests: accessibility/mac/apple-pay-labels.html
EWS Watchlist
Comment 7 2019-04-05 21:25:17 PDT
Created attachment 366874 [details] Archive of layout-test-results from ews112 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-highsierra Platform: Mac OS X 10.13.6
chris fleizach
Comment 8 2019-04-06 19:09:20 PDT
EWS Watchlist
Comment 9 2019-04-06 20:13:09 PDT
Comment on attachment 366896 [details] patch Attachment 366896 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11795001 New failing tests: accessibility/mac/apple-pay-labels.html
EWS Watchlist
Comment 10 2019-04-06 20:13:11 PDT
Created attachment 366898 [details] Archive of layout-test-results from ews103 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 11 2019-04-06 20:27:50 PDT
Comment on attachment 366896 [details] patch Attachment 366896 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11795012 New failing tests: accessibility/mac/apple-pay-labels.html
EWS Watchlist
Comment 12 2019-04-06 20:27:52 PDT
Created attachment 366899 [details] Archive of layout-test-results from ews107 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 13 2019-04-06 20:56:39 PDT
Comment on attachment 366896 [details] patch Attachment 366896 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11795037 New failing tests: accessibility/mac/apple-pay-labels.html
EWS Watchlist
Comment 14 2019-04-06 20:56:41 PDT
Created attachment 366901 [details] Archive of layout-test-results from ews117 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-highsierra Platform: Mac OS X 10.13.6
chris fleizach
Comment 15 2019-04-08 09:01:37 PDT
EWS Watchlist
Comment 16 2019-04-08 09:55:36 PDT
Comment on attachment 366938 [details] patch Attachment 366938 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11806516 New failing tests: accessibility/mac/apple-pay-session-v4.html
EWS Watchlist
Comment 17 2019-04-08 09:55:38 PDT
Created attachment 366944 [details] Archive of layout-test-results from ews100 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-highsierra Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 18 2019-04-08 10:22:56 PDT
Comment on attachment 366938 [details] patch Attachment 366938 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11806704 New failing tests: accessibility/mac/apple-pay-session-v4.html
EWS Watchlist
Comment 19 2019-04-08 10:22:58 PDT
Created attachment 366947 [details] Archive of layout-test-results from ews105 for mac-highsierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
EWS Watchlist
Comment 20 2019-04-08 10:42:18 PDT
Comment on attachment 366938 [details] patch Attachment 366938 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11806644 New failing tests: accessibility/mac/apple-pay-session-v4.html
EWS Watchlist
Comment 21 2019-04-08 10:42:20 PDT
Created attachment 366953 [details] Archive of layout-test-results from ews115 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-highsierra Platform: Mac OS X 10.13.6
chris fleizach
Comment 22 2019-04-08 12:12:41 PDT
EWS Watchlist
Comment 23 2019-04-08 13:09:10 PDT
Comment on attachment 366964 [details] patch Attachment 366964 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11808750 New failing tests: accessibility/mac/apple-pay-session-v4.html
EWS Watchlist
Comment 24 2019-04-08 13:09:12 PDT
Created attachment 366972 [details] Archive of layout-test-results from ews100 for mac-highsierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews100 Port: mac-highsierra Platform: Mac OS X 10.13.6
chris fleizach
Comment 25 2019-04-08 13:56:46 PDT
Andy Estes
Comment 26 2019-04-08 15:28:28 PDT
Comment on attachment 366976 [details] patch I wonder if we would get the same accessibility label, without having to keep our own set of localized strings, by calling +[PKPaymentButton buttonWithType:style:] and then querying its accessibility label?
Joanmarie Diggs
Comment 27 2019-04-08 15:48:13 PDT
(In reply to chris fleizach from comment #0) > If a merchant doesn’t specify an aria-label on their Apple Pay buttons, > WebKit should make a better effort at computing a good default accessibility > label. For instance, it could take the -apple-pay-button-type CSS property > into account to decide whether the button represents “buy”, “subscribe”, > “book”, etc. Aside: I trust you reported this issue to the Apple Pay folks, and this is perhaps an interim fix? Accessibility is, of course, my number one priority. That said, ideally either merchants would be strongly encouraged (e.g. through validation failures) to name their buttons and/or Apple Pay itself would provide the fallback. (Disclaimer: I'm admittedly unfamiliar with being an Apple Pay merchant and what means Apple Pay has to validate and/or correct merchant failures.)
chris fleizach
Comment 28 2019-04-08 16:43:30 PDT
(In reply to Andy Estes from comment #26) > Comment on attachment 366976 [details] > patch > > I wonder if we would get the same accessibility label, without having to > keep our own set of localized strings, by calling +[PKPaymentButton > buttonWithType:style:] and then querying its accessibility label? it's a bit risky. I'm not sure anything happens on Mac (At all right now) to provide the right labels. On iOS, those buttons only get their AX information if an AT is running, which will probably run into some issue Feel safer having these labels unambiguously set here
chris fleizach
Comment 29 2019-04-08 16:44:35 PDT
(In reply to Joanmarie Diggs (irc: joanie) from comment #27) > (In reply to chris fleizach from comment #0) > > If a merchant doesn’t specify an aria-label on their Apple Pay buttons, > > WebKit should make a better effort at computing a good default accessibility > > label. For instance, it could take the -apple-pay-button-type CSS property > > into account to decide whether the button represents “buy”, “subscribe”, > > “book”, etc. > > Aside: I trust you reported this issue to the Apple Pay folks, and this is > perhaps an interim fix? > I'm the same folks in this case. > Accessibility is, of course, my number one priority. That said, ideally > either merchants would be strongly encouraged (e.g. through validation > failures) to name their buttons and/or Apple Pay itself would provide the > fallback. Since all of these buttons are named (there's not any free form buttons for Apple Pay), I feel better having WebKit always provide the label, just like it's always providing the image and text. That way we can be assured of 1) consistency of naming 2) correct localization > > (Disclaimer: I'm admittedly unfamiliar with being an Apple Pay merchant and > what means Apple Pay has to validate and/or correct merchant failures.)
Joanmarie Diggs
Comment 30 2019-04-08 17:50:04 PDT
Comment on attachment 366976 [details] patch r+ = You know what's best in the particular case, but the little standards-centric voice inside me still thinks it feels a bit weird.
chris fleizach
Comment 31 2019-04-08 17:51:58 PDT
(In reply to Joanmarie Diggs (irc: joanie) from comment #30) > Comment on attachment 366976 [details] > patch > > r+ = You know what's best in the particular case, but the little > standards-centric voice inside me still thinks it feels a bit weird. Thanks! if it makes you feel better, -apple-pay buttons are not in any spec =)
WebKit Commit Bot
Comment 32 2019-04-08 17:58:26 PDT
Comment on attachment 366976 [details] patch Clearing flags on attachment: 366976 Committed r244061: <https://trac.webkit.org/changeset/244061>
WebKit Commit Bot
Comment 33 2019-04-08 17:58:28 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.