Re: Make attributed strings accessible
Re: Make attributed strings accessible
- Subject: Re: Make attributed strings accessible
- From: Chris Fleizach via Accessibility-dev <email@hidden>
- Date: Wed, 17 Jul 2019 11:23:34 -0700
You should also use accessibilityAtttbuteLabel for this case
> On Jul 17, 2019, at 11:22 AM, Dan Golden via Accessibility-dev
> <email@hidden> wrote:
>
>
>
>> On Jul 17, 2019, at 11:08 AM, Ortwin Gentz via Accessibility-dev
>> <email@hidden> wrote:
>>
>> Hi All,
>> I've two questions for you regarding making attributed strings accessible.
>> I'm setting the UILabel.accessibilityLabel to the UILabel.attributedText.
>>
>> 1) I'm using NSTextAttachment items to add custom rating stars to my
>> attributed string. Is there a way to provide a replacement string that is
>> only spoken but not displayed?
>
> If you set an accessibilityLabel on the NSTextAttachment, then we should pick
> that up in the accessibilityLabel of your UILabel. We’ll replace the text
> attachments in the attributed text with the axLabel that you’ve set. We
> should also pick up the attributedText automatically from UILabel, so there’s
> no need for you to explicitly set the accessibilityLabel in this case.
>
>>
>> 2) I use a · (middle point) character to separate some texts. Is there a way
>> to exclude certain parts of the string for VO?
>
> I would just filter them out: label.accessibilityLabel =
> [label.accessibilityLabel stringByReplacingOccurrencesOfString:@“·” with:@“
> “];
>
>>
>> Also, I marked parts of the text with
>> UIAccessibilityTextAttributeHeadingLevel: 1 but couldn't hear any
>> difference. What is this key good for?
>>
>> Thanks,
>> Ortwin
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Accessibility-dev mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Accessibility-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Accessibility-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden