accessibilityRegion method

Class: CheckSettingsPlatform: PlaywrightLanguage: JavaScript SDK:

Use to define an accessibility region and its type.

Syntax

eyes.check(Target.window().accessibilityRegion(region_obj1));

eyes.check(Target.window().accessibilityRegion(region_obj2, type));

eyes.check(Target.window().accessibilityRegion(region_obj2));

eyes.check(Target.window().accessibilityRegion(region_ele, type));

eyes.check(Target.window().accessibilityRegion(region_ele));

eyes.check(Target.window().accessibilityRegion(region_sel, type));

eyes.check(Target.window().accessibilityRegion(region_sel));

Parameters

region_obj1
Type:
{
  region: RegionPlain | ElementHandle | Selector;
  type?: AccessibilityRegionType | undefined;
};
An object that defines a rectangular area in the window.

Type definitions

RegionPlain
Used to describe a position and rectangular region in an image. RegionPlain is defined as: LocationPlain&RectangleSizePlain
region_obj2
Type:RegionPlain
An object that defines a rectangular area in the window.

Type definitions

RegionPlain
Used to describe a position and rectangular region in an image. RegionPlain is defined as: LocationPlain&RectangleSizePlain
type
Type:AccessibilityRegionType [Optional ]
The accessibility type of the region.
region_ele
Type:ElementHandle
An element whose position and bounding rectangle defines the region.
region_sel
Type:Selector
A selector to an element whose position and bounding rectangle defines the region.

Type definitions

Selector
Used to identify an HTML element defined as string|{selector:string;type:string}.

Return value

Type: CheckSettings

Remarks

For more information about the Contrast advisor feature see Contrast advisor.