Re: Make attributed strings accessible
Re: Make attributed strings accessible
- Subject: Re: Make attributed strings accessible
- From: Ortwin Gentz via Accessibility-dev <email@hidden>
- Date: Thu, 18 Jul 2019 01:03:58 +0200
Thanks, Dan and Chris.
I tested setting the accessibilityLabel on the NSTextAttachment and it doesn't
seem to work.
Filtering the unwanted text parts for a11y makes sense and works fine.
Can you explain what UIAccessibilityTextAttributeHeadingLevel is good for?
> Am 17.07.2019 um 20:23 schrieb Chris Fleizach <email@hidden>:
>
> 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
>
>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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