@@ -40,6 +40,7 @@ def __init__(self, **kwargs):
4040 self ._custom_components = None
4141 self ._description = None
4242 self ._enabled = True
43+ self ._high_contrast_mode = None
4344 self ._high_contrast_theme = None
4445 self ._keyboard_navigation = None
4546 self ._landmark_verbosity = None
@@ -53,6 +54,7 @@ def __init__(self, **kwargs):
5354 self .custom_components = kwargs .get ('custom_components' , None )
5455 self .description = kwargs .get ('description' , None )
5556 self .enabled = kwargs .get ('enabled' , None )
57+ self .high_contrast_mode = kwargs .get ('high_contrast_mode' , None )
5658 self .high_contrast_theme = kwargs .get ('high_contrast_theme' , None )
5759 self .keyboard_navigation = kwargs .get ('keyboard_navigation' , None )
5860 self .landmark_verbosity = kwargs .get ('landmark_verbosity' , None )
@@ -174,6 +176,25 @@ def enabled(self, value):
174176 else :
175177 self ._enabled = bool (value )
176178
179+ @property
180+ def high_contrast_mode (self ) -> Optional [str ]:
181+ """Controls how
182+ :meth:`.high_contrast_theme <highcharts_core.options.accessibility.Accessibility.high_contrast_theme>`
183+ is applied.
184+
185+ .. note::
186+
187+ Defaults to ``'auto'``, which applies the high contrast theme when the user's system has a
188+ high contrast theme active.
189+
190+ :rtype: :class:`str <python:str>` or :obj:`None <python:None>`
191+ """
192+ return self ._high_contrast_mode
193+
194+ @high_contrast_mode .setter
195+ def high_contrast_mode (self , value ):
196+ self ._high_contrast_mode = validators .string (value , allow_empty = True )
197+
177198 @property
178199 def high_contrast_theme (self ) -> Any :
179200 """Theme to apply to the chart when Windows High Contrast Mode is detected.
@@ -356,6 +377,7 @@ def _get_kwargs_from_dict(cls, as_dict):
356377 'custom_components' : as_dict .get ('customComponents' , None ),
357378 'description' : as_dict .get ('description' , None ),
358379 'enabled' : as_dict .get ('enabled' , None ),
380+ 'high_contrast_mode' : as_dict .get ('highContrastMode' , None ),
359381 'high_contrast_theme' : as_dict .get ('highContrastTheme' , None ),
360382 'keyboard_navigation' : as_dict .get ('keyboardNavigation' , None ),
361383 'landmark_verbosity' : as_dict .get ('landmarkVerbosity' , None ),
@@ -374,6 +396,7 @@ def _to_untrimmed_dict(self, in_cls = None) -> dict:
374396 'customComponents' : self .custom_components ,
375397 'description' : self .description ,
376398 'enabled' : self .enabled ,
399+ 'highContrastMode' : self .high_contrast_mode ,
377400 'highContrastTheme' : self .high_contrast_theme ,
378401 'keyboardNavigation' : self .keyboard_navigation ,
379402 'landmarkVerbosity' : self .landmark_verbosity ,
0 commit comments