new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Electron · API · all subjects

app/accessibility

11 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

app.isAccessibilitySupportEnabled() method

Returns a boolean. True if Chromium's accessibility support is enabled, false otherwise. This API returns true if the use of assistive technologies such as screen readers has been detected.

app.setAccessibilitySupportEnabled(enabled) method

The app.setAccessibilitySupportEnabled(enabled) method accepts a boolean parameter to enable or disable accessibility tree rendering. Manually enables Chromium's accessibility support, allowing developers to expose accessibility switch to users in application settings. Disabled by default. This API must be called after the ready event is emitted. Rendering accessibility tree can significantly affect performance and should not be enabled by default. Calling this method enables the following features: nativeAPIs, webContents, inlineTextBoxes, and extendedProperties.

app.getAccessibilitySupportFeatures() method return values

The app.getAccessibilitySupportFeatures() method returns a string array of currently enabled accessibility support components. Possible values are: nativeAPIs (Native OS accessibility APIs integration enabled), webContents (Web contents accessibility tree exposure enabled), inlineTextBoxes (Inline text boxes with character bounding boxes enabled), extendedProperties (Extended accessibility properties enabled), screenReader (Screen reader specific mode enabled), html (HTML accessibility tree construction enabled), labelImages (Accessibility support for automatic image annotations), pdfPrinting (Accessibility support for PDF printing enabled). The array may be empty if no accessibility modes are active. Use app.isAccessibilitySupportEnabled() for legacy boolean check; prefer this method for granular diagnostics or telemetry.

app.getAccessibilitySupportFeatures() example checking for screen reader

Example code showing how to check if screen reader is enabled: const { app } = require('electron') app.whenReady().then(() => { if (app.getAccessibilitySupportFeatures().includes('screenReader')) { // Change some app UI to better work with Screen Readers. } })

app.setAccessibilitySupportFeatures(features) method

The app.setAccessibilitySupportFeatures(features) method accepts a string array of accessibility features to enable. Possible values are: nativeAPIs, webContents, inlineTextBoxes, extendedProperties, screenReader, html, labelImages, pdfPrinting. To disable all supported features, pass an empty array [].

app.setAccessibilitySupportFeatures() example enabling specific features

Example code showing how to enable a subset of accessibility features and later disable all: const { app } = require('electron') app.whenReady().then(() => { // Enable a subset of features: app.setAccessibilitySupportFeatures([ 'screenReader', 'pdfPrinting', 'webContents' ]) // Other logic // Some time later, disable all features: app.setAccessibilitySupportFeatures([]) })

app.accessibilitySupportEnabled property macOS Windows

A boolean property (read-write) that is true if Chromium's accessibility support is enabled, false otherwise. This property is true if the use of assistive technologies such as screen readers has been detected. Setting this property to true manually enables Chromium's accessibility support. Disabled by default. This API must be called after the ready event is emitted. Rendering accessibility tree can significantly affect performance and should not be enabled by default.

WebPreferences accessibleTitle option

The accessibleTitle string option (optional) provides an alternative title string only to accessibility tools such as screen readers. This string is not directly visible to users.

TouchBarButton accessibilityLabel property

The accessibilityLabel property is a string representing the description of the button to be read by a screen reader. It will only be read by screen readers if no label is set. When defining this property, ensure you have considered macOS best practices as documented in Apple's NSAccessibilityButton documentation.

TouchBarLabel.accessibilityLabel property

The touchBarLabel.accessibilityLabel property is a string representing the description of the label to be read by a screen reader.

TouchBarLabel accessibilityLabel best practices

When defining the accessibilityLabel for a TouchBarLabel, ensure you have considered macOS best practices as documented in the NSAccessibilityButton accessibilityLabel reference.

Give your agent this brain