reorder control now proxies accessibility into a seperate element#533
reorder control now proxies accessibility into a seperate element#533RoyalPineapple merged 1 commit intomainfrom
Conversation
4f98207 to
9946411
Compare
76faf8e to
50ae673
Compare
5c68a31 to
4e398e6
Compare
| // Created by Kyle Van Essen on 11/14/19. | ||
| // | ||
|
|
||
| import Accessibility |
|
|
||
| let blueprintView = BlueprintView() | ||
| let recognizer : ItemReordering.GestureRecognizer | ||
| private lazy var proxyElement = UIAccessibilityElement(accessibilityContainer: self) |
There was a problem hiding this comment.
Huh, TIL, I had no idea you could do this!
There was a problem hiding this comment.
Same, although seems obvious in retrospect.
a4ac909 to
abf5d36
Compare
| isEnabled : Bool = true, | ||
| actions : ReorderingActions, | ||
| begins: Begins = .onTap, | ||
| reorderItemAccessibilityLabel: String? = nil, |
There was a problem hiding this comment.
Might be helpful to add docs for the parameters and indicate to the caller what a recommended localised reordering label might be.
There was a problem hiding this comment.
nit: I noticed below that we're using a string format and plugging in the item name. What do you think about making this an enum instead where the caller can specify whether it's just the item name and they use our localised terminology or whether they themselves want to provide the terminology. For example, in case someone might want to call it Rearrange Foo instead of Reorder Foo.
There was a problem hiding this comment.
I'm going to push this entirely down to the caller, i think you're right that it needs more customizability but i think that too much magic is overcomplicated here.
| } | ||
|
|
||
| @objc private func updateGesturePressDuration() { | ||
| self.recognizer.minimumPressDuration = UIAccessibility.isVoiceOverRunning ? 0.0 : self.minimumPressDuration |
There was a problem hiding this comment.
Maybe not for this PR, but wondering how the behaviour would be with full keyboard access, Switch Control, and Voice Control.
There was a problem hiding this comment.
Tested this out using full keyboard access. It kind of works, but I observed that Listable reordering is overall broken for full keyboard access. Then again, even the iOS home screen felt broken for full keyboard access, so there's no prior art to even copy from.
There was a problem hiding this comment.
I wouldnt expect the gesture recognizer itself to work well with keyboard access. do the accessibility actions work with full keyboard access?
meherkasam-square
left a comment
There was a problem hiding this comment.
Can you please add an entry to the changelog?
162cb5a to
ce3b914
Compare
ce3b914 to
4ae91f1
Compare
* origin/main: Prepare 14.3.0 (#540) Custom Update Animations (#539) Update version to 14.2.0 Prepare 14.2.0 release, which contains a Blueprint update Bumping versions to 14.1.0 (#535) reorder control now proxies accessibility into a seperate element (#533) Prepare 14.0.3 Fix a crash that could occur during cell reuse if a list contained different types of headers. The wrong ObjectIdentifier was being compared and stored. Get a repro for the reordering crash reported in #market-ios chore: Generated documentation now uses a static copyright notice to avoid noisy diffs (#530) Bumping versions to 15.0.2 fix: Fix tap gesture swallowing touches in swipe actions view Bump to 14.0.1 Fix SPM Blueprint dependency Release 14.0.0, update BlueprintUI to 3.0.0 (#525) chore: iOS 15 deployment target bump [UI-5187] (#524) chore: Bump CI to Xcode 15.1. Bump gems. [UI-5186] (#523) fix: don't cancel touches in view for tap gesture recognizer Revert weak change Revert "Revert "Supplementary Tracking Fixes (#433)""
…rovements * origin/main: (33 commits) Prepare 14.3.0 (#540) Custom Update Animations (#539) Update version to 14.2.0 Prepare 14.2.0 release, which contains a Blueprint update Bumping versions to 14.1.0 (#535) reorder control now proxies accessibility into a seperate element (#533) Prepare 14.0.3 Fix a crash that could occur during cell reuse if a list contained different types of headers. The wrong ObjectIdentifier was being compared and stored. Get a repro for the reordering crash reported in #market-ios chore: Generated documentation now uses a static copyright notice to avoid noisy diffs (#530) Bumping versions to 15.0.2 fix: Fix tap gesture swallowing touches in swipe actions view Bump to 14.0.1 Fix SPM Blueprint dependency Release 14.0.0, update BlueprintUI to 3.0.0 (#525) chore: iOS 15 deployment target bump [UI-5187] (#524) chore: Bump CI to Xcode 15.1. Bump gems. [UI-5186] (#523) fix: don't cancel touches in view for tap gesture recognizer fix: don't cancel touches in view for tap gesture recognizer Revert weak change ...
This allows the gesture recognizer to be applied to a view without overriding its accessibility.
Useful in situations where you'd like the gesture to apply to the entire cell for example.
Checklist
Please do the following before merging:
Mainsection.