Add an API call for detecting whether the Bold Text accessibility feature is enabled

Originator:simon
Number:rdar://16172586 Date Originated:26-Feb-2014 03:22 PM
Status:Open Resolved:
Product:iOS SDK Product Version:7.0.6
Classification:UI/Usability Reproducible:Always
 
The Bold Text accessibility feature in iOS 7 appears to have no API for detecting whether it's enabled or not.

In an app that uses custom fonts, I want to be able to set display fonts depending on whether this feature is enabled. That is, to do something like this:

    if (UIAccessibilityBoldTextModeEnabled()) {
        myTextualView.font = [UIFont fontWithName:@"Foobar-Bold" size:myFontSize];
    } else {
        myTextualView.font = [UIFont fontWithName:@"Foobar-Regular" size:myFontSize];
    }

If such an API call does, in fact, exist, please redirect this ticket to the API Documentation team. :-)

Comments

Looks like this is now supported via UIAccessibility.isBoldTextEnabled (iOS 8+). Also toggling bold font does trigger the notification UIContentSizeCategory.didChangeNotification. Although officially the userInfo of this notification only contains the UIContentSizeCategory.newValueUserInfoKey it also includes a UIContentSizeCategoryTextLegibilityEnabledKey which as far as I can tell is undocumented. But you can still just query isBoldTextEnabled regardless.

By christopher_hale at July 31, 2023, 4:01 p.m. (reply...)

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!