Should newlines be part of AXRangeForLine for a hardline?
Should newlines be part of AXRangeForLine for a hardline?
- Subject: Should newlines be part of AXRangeForLine for a hardline?
- From: Boris Dušek <email@hidden>
- Date: Sun, 04 Jan 2015 16:48:01 +0100
Hello,
on OS X, if some line is ended by newline (i.e. a last line of a paragraph, a.k.a. a hardline, as opposed to a softline which just results from visual text wrapping at some maximum width), should AXRangeForLine for that line include the corresponding newline character?
These Apple apps *do* include it:
- TextEdit
- Xcode
- NSTextView (not an app, but the AppKit class)
These Apple apps do *not* include it:
- Mail (new email text area)
- Pages (document text area)
To me, the advantage of a newline is that it is displayed on the braille display, so when one examines the text on a braille display, when they meet a newline character, they know that the paragraph has ended (and if they don’t meet newline, they know it has not). Also in Punctuation set to All, newline is reported during speech.
Also, as VoiceOver treats an empty line without a newline (i.e. AXRangeForLine returning an empty range) as an end-of-file (VO-arrow down won’t move past it; but might be a VO bug), empty lines must return a single-character range containing newline anyway, so returning newline also for non-empty lines terminated by newline makes the behavior more consistent (and thus also easier to implement).
So for all of the above reasons, it would seem reasonable to me to include newline as part of the range AXRangeForLine returns. But then at least the 2 important Apple apps (Mail and Pages) think otherwise.
So I was wondering if there is any guidance about whether “to newline or not to newline” in AXRangeForLine for lines terminated by a newline character?
Thanks,
Boris
_______________________________________________
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