Skip to content

Commit

Permalink
chore: update docs manually
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzhao authored and molant committed Nov 10, 2021
1 parent c462c4e commit e9a98cd
Show file tree
Hide file tree
Showing 10 changed files with 284 additions and 381 deletions.
3 changes: 1 addition & 2 deletions docs/latest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,9 @@ an issue:
* [Testing and Debugging](latest/tutorial/application-debugging.md)
* [Debugging the Main Process](latest/tutorial/debugging-main-process.md)
* [Debugging with Visual Studio Code](latest/tutorial/debugging-vscode.md)
* [Using Selenium and WebDriver](latest/tutorial/using-selenium-and-webdriver.md)
* [Testing on Headless CI Systems (Travis, Jenkins)](latest/tutorial/testing-on-headless-ci.md)
* [DevTools Extension](latest/tutorial/devtools-extension.md)
* [Automated Testing with a Custom Driver](latest/tutorial/automated-testing-with-a-custom-driver.md)
* [Automated Testing](latest/tutorial/automated-testing.md)
* [REPL](latest/tutorial/repl.md)
* [Distribution](latest/tutorial/application-distribution.md)
* [Supported Platforms](latest/tutorial/support.md#supported-platforms)
Expand Down
8 changes: 4 additions & 4 deletions docs/latest/api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ Returns:
* `launchInfo` Record<string, any&#62; | [NotificationResponse](latest/api/structures/notification-response.md) _macOS_

Emitted once, when Electron has finished initializing. On macOS, `launchInfo`
holds the `userInfo` of the `NSUserNotification` or information from
[`UNNotificationResponse`](latest/api/structures/notification-response.md) that was used to open the
application, if it was launched from Notification Center. You can also call
`app.isReady()` to check if this event has already fired and `app.whenReady()`
holds the `userInfo` of the [`NSUserNotification`](https://developer.apple.com/documentation/foundation/nsusernotification)
or information from [`UNNotificationResponse`](https://developer.apple.com/documentation/usernotifications/unnotificationresponse)
that was used to open the application, if it was launched from Notification Center.
You can also call `app.isReady()` to check if this event has already fired and `app.whenReady()`
to get a Promise that is fulfilled when Electron is initialized.

### Event: 'window-all-closed'
Expand Down
2 changes: 1 addition & 1 deletion docs/latest/api/browser-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ current window into a top-level window.

#### `win.getParentWindow()`

Returns `BrowserWindow` - The parent window.
Returns `BrowserWindow | null` - The parent window or `null` if there is no parent.

#### `win.getChildWindows()`

Expand Down
2 changes: 1 addition & 1 deletion docs/latest/api/clipboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Returns `Boolean` - Whether the clipboard supports the specified `format`.
```js
const { clipboard } = require('electron')

const hasFormat = clipboard.has('<p>selection</p>')
const hasFormat = clipboard.has('public/utf8-plain-text')
console.log(hasFormat)
// 'true' or 'false'
```
Expand Down
49 changes: 2 additions & 47 deletions docs/latest/tutorial/accessibility.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,14 @@
---
title: "Accessibility"
description: "Making accessible applications is important and we're happy to provide functionality to Devtron and Spectron that gives developers the opportunity to make their apps better for everyone."
description: "Accessibility concerns in Electron applications are similar to those of websites because they're both ultimately HTML."
slug: accessibility
hide_title: false
---

# Accessibility

Making accessible applications is important and we're happy to provide
functionality to [Devtron][devtron] and [Spectron][spectron] that gives
developers the opportunity to make their apps better for everyone.

---

Accessibility concerns in Electron applications are similar to those of
websites because they're both ultimately HTML. With Electron apps, however,
you can't use the online resources for accessibility audits because your app
doesn't have a URL to point the auditor to.

These features bring those auditing tools to your Electron app. You can
choose to add audits to your tests with Spectron or use them within DevTools
with Devtron. Read on for a summary of the tools.

## Spectron

In the testing framework Spectron, you can now audit each window and `<webview>`
tag in your application. For example:

```javascript
app.client.auditAccessibility().then(function (audit) {
if (audit.failed) {
console.error(audit.message)
}
})
```

You can read more about this feature in [Spectron's documentation][spectron-a11y].

## Devtron

In Devtron, there is an accessibility tab which will allow you to audit a
page in your app, sort and filter the results.

![devtron screenshot][devtron-screenshot]

Both of these tools are using the [Accessibility Developer Tools][a11y-devtools]
library built by Google for Chrome. You can learn more about the accessibility
audit rules this library uses on that [repository's wiki][a11y-devtools-wiki].

If you know of other great accessibility tools for Electron, add them to the
accessibility documentation with a pull request.
websites because they're both ultimately HTML.

## Manually enabling accessibility features

Expand Down Expand Up @@ -91,10 +50,6 @@ CFStringRef kAXManualAccessibility = CFSTR("AXManualAccessibility");
}
```

[devtron]: https://electronjs.org/devtron
[devtron-screenshot]: https://cloud.githubusercontent.com/assets/1305617/17156618/9f9bcd72-533f-11e6-880d-389115f40a2a.png
[spectron]: https://electronjs.org/spectron
[spectron-a11y]: https://github.com/electron/spectron#accessibility-testing
[a11y-docs]: https://www.chromium.org/developers/design-documents/accessibility#TOC-How-Chrome-detects-the-presence-of-Assistive-Technology
[a11y-devtools]: https://github.com/GoogleChrome/accessibility-developer-tools
[a11y-devtools-wiki]: https://github.com/GoogleChrome/accessibility-developer-tools/wiki/Audit-Rules
Expand Down
142 changes: 0 additions & 142 deletions docs/latest/tutorial/automated-testing-with-a-custom-driver.md

This file was deleted.

Loading

0 comments on commit e9a98cd

Please sign in to comment.