Skip to content
This repository has been archived by the owner on Jun 7, 2020. It is now read-only.

[NEW] Project 09 - Recording and sending audio VoiceOver accessible #2748

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

rudrankriyam
Copy link
Contributor

@rudrankriyam rudrankriyam commented Aug 13, 2019

@RocketChat/ios

  • The micButton is described in VoiceOver as “Mic Button” which needs to be assigned an accessibilityLabel = “Record Audio”
  • The sendButton is described in VoiceOver as “Red Mic Button” which needs to be assigned an accessibilityLabel = “Stop recording”
  • The timeLabel is described in VoiceOver as “zero three” which needs to be accessible as “Duration three seconds.” This will be accomplished using DateComponentsFormatter.
  • “Swipe to cancel” button will be enabled for a left swipe using UIAccessibilityTraitAllowsDirectInteraction .

The following buttons are described in VoiceOver with a redundant “Button”

  • The playButton which needs to be assigned an accessibilityLabel = “Play” instead of “Play Button” ✅
  • The sendButton which needs to be assigned an accessibilityLabel = “Send” instead of “Send Button” ✅
  • The discardButton which needs to be assigned an accessibilityLabel = “Discard” instead of “Discard Button” ✅
  • The sendButton sometimes is described in VoiceOver as “Red Mic Button” ✅
  • The timeLabel is described in VoiceOver as “zero two” which needs to be accessible as “Duration two seconds.” This will be accomplished using DateComponentsFormatter.
  • Currently the Slider is described in VoiceOver as “Zero percent. Adjustable. Swipe up or down with one finger to adjust the value”. It should be rather “Recording position zero seconds of two seconds. Adjustable.”
  • Setting UIAccessibilityTraits.adjustable for the AudioView.
  • The playButton is described in VoiceOver as “Player Play” which needs to be assigned an accessibilityLabel = “Play Audio” ✅

I hid the accessibilityElements wherever applicable so it provides a smooth VoiceOver experience.

@codecov
Copy link

codecov bot commented Aug 14, 2019

Codecov Report

Merging #2748 into develop will decrease coverage by 1.06%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2748      +/-   ##
===========================================
- Coverage     46.1%   45.04%   -1.07%     
===========================================
  Files          626      626              
  Lines        28938    28953      +15     
===========================================
- Hits         13343    13042     -301     
- Misses       15595    15911     +316
Impacted Files Coverage Δ
...t.Chat/Views/Cells/Chat/ChatMessageAudioView.swift 0% <0%> (ø) ⬆️
...Chat/Controllers/Chat/MessagesViewController.swift 1.37% <0%> (-42.87%) ⬇️
...ews/Chat/New Chat/Cells/BaseAudioMessageCell.swift 0% <0%> (ø) ⬆️
Rocket.Chat/Helpers/RCDateFormatter.swift 0% <0%> (ø) ⬆️
Rocket.Chat/Views/Base/BaseNavigationBar.swift 0% <0%> (-100%) ⬇️
Rocket.Chat/Views/Chat/ChatAnnouncementView.swift 0% <0%> (-83.34%) ⬇️
...ontrollers/Chat/MessagesViewControllerTyping.swift 0% <0%> (-77.78%) ⬇️
...ntrollers/Chat/MessagesViewControllerJoining.swift 0% <0%> (-71.74%) ⬇️
...trollers/Chat/MessagesViewControllerDrafting.swift 20% <0%> (-60%) ⬇️
...Views/Cells/Subscription/ChatPreviewModeView.swift 0% <0%> (-43.75%) ⬇️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f5ad00...05aa00c. Read the comment docs.

@rudrankriyam rudrankriyam changed the title [WIP] [NEW] Recording and sending audio VoiceOver accessible - Project 09 [NEW] Recording and sending audio VoiceOver accessible - Project 09 Aug 14, 2019
Copy link
Collaborator

@Sameesunkaria Sameesunkaria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rudrankriyam You did a really great work on this PR! 🎉

The only thing that wasn't working was the duration slider. It still says "0% adjustable". And maybe you wanna bring those changes over to the audio player in chat as well.

@cardoso
Copy link
Collaborator

cardoso commented Aug 16, 2019

Awesome work. Thank you!

@rudrankriyam rudrankriyam changed the title [NEW] Recording and sending audio VoiceOver accessible - Project 09 [NEW] Project 09 - Recording and sending audio VoiceOver accessible Aug 18, 2019
progressSlider.setValue(progressSlider.value - 10, animated: true)
valueUpdated()
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File Line Length Violation: File should contain 400 lines or less: currently contains 449 (file_length)

@@ -397,3 +420,30 @@ extension AudioView {
}

}

// MARK: Accessibility

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark Violation: MARK comment should be in valid format. e.g. '// MARK: ...' or '// MARK: - ...' (mark)

self.timeLabel.text = displayFormat
self.timeLabel.accessibilityLabel = ComposerView.localized(.durationLabel) + self.timeDuration(displayTime)

self.progressSlider.accessibilityValue = ComposerView.localized(.sliderLabelPosition) + self.timeDuration(Int(player.currentTime))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line Length Violation: Line should be 120 characters or less: currently 142 characters (line_length)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants