UIBarButtonItem's accessibilityLabel should be settable through interface builder

Originator:keithbsmiley
Number:rdar://23376704 Date Originated:03-Nov-2015 10:07 AM
Status:Duplicate of 7034386 (open) Resolved:
Product:Developer Tools Product Version:Xcode 7.1
Classification:Other Bug Reproducible:Always
 
Summary:

UIBarButtonItem's accessibilityLabel cannot be set through interface builder, meaning these have to be set in code.

Steps to Reproduce:

1. In interface builder, create a bar button item
2. Go to the Identity Inspector tab

Expected Results:

There should be a section for adding accessibility labels, identifiers, etc.

Actual Results:

There is no way to change these accessibility related properties through interface builder.

Notes:

Currently we are working around this using this extension on UIBarButtonItem:

public extension UIBarButtonItem {
    /// UIBarButtonItem accessibilityLabel settable from IB
    @IBInspectable public var voiceoverLabel: String! {
        get { return self.accessibilityLabel }
        set { self.accessibilityLabel = newValue }
    }
}

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!