XCUIElementAttribute `hasFocus` is only available on tvOS, but not marked as such in documentation

Originator:hello
Number:rdar://49950589 Date Originated:2019-04-16
Status:Open Resolved:
Product:Documentation Product Version:Xcode 10.2 (10E125)
Classification: Reproducible:Always
 
Summary:
The `hasFocus` `XCUIElementAttribute` is only available on tvOS, but it is not marked as such in the Xcode documentation.

Steps to Reproduce:
Open [the documentation page for `hasFocus`](https://developer.apple.com/documentation/xctest/xcuielementattributes/1627636-hasfocus), and note no mention of OS compatibility.

Expected Results:
Expected to see a note somewhere saying that the `hasFocus` attribute is only available on tvOS.

Actual Results:
No note is present saying that the `hasFocus` attribute is only available on tvOS.

Version/Build:
Xcode 10.2 (10E125)

Notes:
I was able to deduce that `hasFocus` is only available on tvOS be looking at the `XCUIElementAttributes.h` file, where on line 69 we have:

```objc
#if TARGET_OS_TV
/*! Whether or not the elment has UI focus. */
@property (readonly) BOOL hasFocus;
#endif
```

Another (better) solution to this issue would be to make the `hasFocus` attribute available on other OS’s, particularly macOS. I’ll also be filing an enhancement ticket in Developer Tools asking for that.

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!