GitHawk icon indicating copy to clipboard operation
GitHawk copied to clipboard

VoiceOver should select all of comment header except "..."

Open rnystrom opened this issue 6 years ago • 4 comments

Don't need to select image view, username, and date label separately. Squish into one AX view (maybe using custom rect?) and make it readable:

"rnystrom commented 3 minutes ago"

rnystrom avatar Dec 12 '17 14:12 rnystrom

I could use some help with this. I am unsure how we should / can group the image, username and label (but leaving out the ...). Should we add them to a container view? Or do you have another proposal?

BasThomas avatar Jan 12 '18 21:01 BasThomas

If we go that route, we would probably end up with something like this (simplified):

let containerView = UIView() // contains the image, username label and date label
containerView.isAccessibilityElement = true
containerView.accessibilityTraits |= UIAccessibilityTraitButton

containerView.accessibilityLabel = NSLocalizedString("\(usernameLabel.text) commented \(dateLabel.text)", comment: "The accessibility label to describe the metadata of a comment")
containerView.onTap {
  // this would probably not be a closure and so on, but you get the idea
  // handle opening the user profile here
}

BasThomas avatar Jan 12 '18 21:01 BasThomas

Don't we already have a view behind the controls used to make it blue when you're the author? If you turn off accessibility on the image view, label etc (Everything but the ...) then you will be able to select the background for the entire header and/or select the ... to handle that!

Also the message should include edited information

Sherlouk avatar Jan 12 '18 22:01 Sherlouk

Nice! Will take a look tomorrow. Good one regarding edits!

Sent with GitHawk

BasThomas avatar Jan 12 '18 22:01 BasThomas