Community
Participate
Working Groups
VoiceOver doesn't read the date of a Carbon ClockControl with type MonthDayYear. It only reads the numeric values of the text fields. For example, when the month field has focus VO says "10 edit text". This is a known bug at Apple, and I even opened a new radar to track it. However, I doubt that it will be fixed. The same is true of other ClockControl settings, such as for time. VoiceOver does, however, correctly read the date of a Cocoa NSDatePicker control. So it is possible to make the Carbon ClockControl (an AXDateField) emulate the Cocoa control (an AXDateTimeArea) for accessibility purposes. Unfortunately, the AXDateTimeArea role and the AXDateTimeComponents attribute are not public and not documented, so they could possibly change in future. AXValue is a CFDateRef. So we would need to convert the LongDateTime from the Carbon ClockControl (kControlClockLongDateTag) to a CFDateRef - not sure how to do that. The AXDateTimeComponents map to the appropriate combination of NSDatePickerElementFlag values found in NSDatePickerCell.h.
Scott, can you confirm that AXDateTimeArea and AXDateTimeComponents are undocumented? Do you know if they ever will become public? Do you happen to have code somewhere that converts from LongDateTime to CFDateRef? Thanks!
Wow, this is an old bug. And I see I was asked something 3 years ago. :-) The DateTime control now works as expected in Cocoa because we're using a standard control. Carbon accessibility won't be changing anytime soon, so this is a WONTFIX.