mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Fix voiceover order of room creation header and message composer.
This commit is contained in:
@@ -70,6 +70,8 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
|
||||
|
||||
_sendMode = RoomInputToolbarViewSendModeSend;
|
||||
self.inputContextViewHeightConstraint.constant = 0;
|
||||
self.inputContextLabel.isAccessibilityElement = NO;
|
||||
self.inputContextButton.isAccessibilityElement = NO;
|
||||
|
||||
[self.rightInputToolbarButton setTitle:nil forState:UIControlStateNormal];
|
||||
[self.rightInputToolbarButton setTitle:nil forState:UIControlStateHighlighted];
|
||||
@@ -252,6 +254,10 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
|
||||
break;
|
||||
}
|
||||
|
||||
// Hide the context items from VoiceOver when the context view is "hidden".
|
||||
self.inputContextLabel.isAccessibilityElement = self.inputContextViewHeightConstraint.constant > 0;
|
||||
self.inputContextButton.isAccessibilityElement = self.inputContextViewHeightConstraint.constant > 0;
|
||||
|
||||
[self.rightInputToolbarButton setImage:buttonImage forState:UIControlStateNormal];
|
||||
|
||||
if (self.maxHeight && updatedHeight > self.maxHeight)
|
||||
@@ -477,11 +483,22 @@ static const NSTimeInterval kActionMenuComposerHeightAnimationDuration = .3;
|
||||
[self.mainToolbarView.leftAnchor constraintEqualToAnchor:self.voiceMessageToolbarView.leftAnchor],
|
||||
[self.mainToolbarView.bottomAnchor constraintEqualToAnchor:self.voiceMessageToolbarView.bottomAnchor],
|
||||
[self.mainToolbarView.rightAnchor constraintEqualToAnchor:self.voiceMessageToolbarView.rightAnchor]]];
|
||||
|
||||
// The voice message toolbar is taller than the input toolbar so the record button is read
|
||||
// out before the other subviews. Fix this by manually adding the elements in the right order.
|
||||
self.accessibilityElements = @[self.attachMediaButton,
|
||||
self.actionsBar,
|
||||
self.inputContextLabel,
|
||||
self.inputContextButton,
|
||||
self.textView,
|
||||
self.rightInputToolbarButton,
|
||||
self.voiceMessageToolbarView];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.voiceMessageToolbarView removeFromSuperview];
|
||||
_voiceMessageToolbarView = nil;
|
||||
self.accessibilityElements = nil;
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user