How to Make VO to Announce ValueChanged Notification on Mac?
How to Make VO to Announce ValueChanged Notification on Mac?
- Subject: How to Make VO to Announce ValueChanged Notification on Mac?
- From: Chi Kim via Accessibility-dev <email@hidden>
- Date: Tue, 26 Nov 2019 08:57:09 +0000
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O4OEb/eucBSuiHvp3yshzDxaBV0jTtCSR9yF09zf1wA=; b=ZcUcO97WascPjFPrShzfT7NPDIdJ6BWe0bpEAwUdLCmV1ZngFztQORMLT0va6OowCbFOVNIEGZJvnKUf1gZZW/PCxgHm16hWHiITg1X3f0ZonzuBqr0JxvqHSKz5u9CkH3onR905EzIutVXMNEyRpBHe/4c9eznkZagB9iSBT3KxnMwIgCMdbW/aN2yBIyTkFzht9ob83SiQ/hraCOVcQsNBJhptAm71E73FVKIK35T/3Sx3/HWL9vpVRyqA0pX04XXhzDSl+p63YvMeG8Io3+8DDZta6M9XfSQ9Q2KUxPDcWZqbm1gxAdeOglJveRISDA6K1CMTly7ja1ebcY9ItQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cbNCaD0kN4HbVgn9sPDHH30dGpJDO1Y6RF8LJEGljN2nHhUfmCD81uy1Y7vzH9A7HZQttPtPmaXyPfCi8oxocZYUhU1w4HINwvQ8CUJ12eXa7xU1i8kP9UfCwJz6aUbEdjs31T3OUVofbZcAb+z8Y4wDdJWD85n7LFIj+YdR4hF2WpevbWkyYrYZvGB8hRyS2fQrW4+vFgNdz9z0vo/+YfoCMLG0RI4H06MoMo5TFPfkmmSYUl+4X60RFbjzujnFAKQomtpKtMcasbAk+V9G2ESBVI2sf79tytB5Lh+xi7HNdTr+XLdTZpxtB6iAn0XBibnwBoJCR2hBhijQiOF03Q==
- Thread-topic: How to Make VO to Announce ValueChanged Notification on Mac?
Hello,
I have a very simple testing code below for a custom NSView, but VO
acknowledges titleChanged but ignores valueChanged notification.
I have two shortcuts for executing changeTitle and changeValue.
After making sure VO cursor is on the element, if I press the shortcut
for changeTitle, VO announces the new title.
However, if I press the shortcut for changeValue, VO says nothing.
If I refocus the VO cursor manually, it reads the new value.
I can force VO to say by sending either layoutChanged or
announcementRequested notification, but I'm wondering why VO ignores
valueChanged notification?
The testing code is below, and thanks so much for your help!
Chi
class CustomView:NSView {
var val = "Value"
var title = "Title"
override func isAccessibilityElement() -> Bool {
return true
}
override func accessibilityRole() -> NSAccessibility.Role? {
return .button
}
override func accessibilityTitle() -> String? {
return title
}
func changeTitle() {
title = "title \(Int.random(in:1...10))"
NSAccessibility.post(element: self, notification: .titleChanged)
}
override func accessibilityValue() -> Any? {
return val
}
func changeValue() {
val = "Value \(Int.random(in:1...10))"
NSAccessibility.post(element: self, notification: .valueChanged)
}
}
_______________________________________________
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