Skip to content

Commit 825efee

Browse files
committed
Empty implementation of setAccessibilityValue: to be safe
1 parent ceca698 commit 825efee

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

platforms/macos/src/node.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,12 @@ declare_class!(
421421
.unwrap_or_else(null_mut)
422422
}
423423

424+
#[sel(setAccessibilityValue:)]
425+
fn set_value(&self, _value: &NSObject) {
426+
// This isn't yet implemented. See the comment on this selector
427+
// in `is_selector_allowed`.
428+
}
429+
424430
#[sel(accessibilityMinValue)]
425431
fn min_value(&self) -> *mut NSNumber {
426432
self.resolve(|node| {
@@ -701,10 +707,10 @@ declare_class!(
701707
return node.supports_text_ranges();
702708
}
703709
if selector == sel!(setAccessibilityValue:) {
704-
// We don't implement this selector, and it's not clear
705-
// if VoiceOver ever actually uses it, but it must be
706-
// allowed for editable text in order to get the expected
707-
// VoiceOver behavior.
710+
// Our implementation of this currently does nothing,
711+
// and it's not clear if VoiceOver ever actually uses it,
712+
// but it must be allowed for editable text in order to get
713+
// the expected VoiceOver behavior.
708714
return node.supports_text_ranges() && !node.is_read_only();
709715
}
710716
selector == sel!(accessibilityParent)

0 commit comments

Comments
 (0)