Add Craft.cp.announce() and implement for various loading states#15569
Add Craft.cp.announce() and implement for various loading states#15569brandonkelly merged 14 commits into5.4from
Conversation
… the button; add loading message on add passkey click
…s, use Craft announcer in PreviewFileModal.js
… set as the active live region; cleanup attributes
brianjhanson
left a comment
There was a problem hiding this comment.
Looks good! It could be useful to split the announce function out from the Craft.cp object, but that's probably for down the road.
Thank you for reviewing @brianjhanson. Where do you think it would be best to move it to? |
Excellent question and why I think it's for a separate PR. It would probably make the most sense as a separate package but we don't have any of the infrastructure in place for that yet. |
[ci skip]
Description
Previously, we had live regions that were very localized (i.e., one for element indexes, live regions attached to buttons like the
MultiFunctionBtn, etc.). This PR attempts to simplify screen reader announcements for status messages by:#global-live-region)Slideoutcomponent (in addition to theModallive region implemented by @i-just)#global-live-regionand contents of previous layers) from assistive technology.Related issues
Resolves PT-2091, PT-2062, PT-2064, PT-2063, PT-2060, PT-2089, PT-2031