This article is for product managers and developers who are looking to make their website or application compatible with Grammarly’s product offerings.
For Grammarly for Windows to work on your website or application, the textual content must be made visible to accessibility. Please make sure that there's no parent control in the accessibility tree that has zero height or width.
Native applications:
- Use Accessibility Insights for Windows to check that the text field properly supports UI Automation Text Pattern.
- If there's a scroll in the text field, check the UI Automation Scroll Control Pattern as well.
Websites or Electron-based applications:
- Any HTML-based UI has accessibility support by default. Please make sure that the text field is visible to accessibility and that there are no parent elements in the accessibility tree with zero height or width.
- Grammarly doesn't initialize in input fields. Please use contenteditable or textarea tags and make sure the width is more than 150px.
For Grammarly for Mac to work on your website, the textual content must be made visible to accessibility by calling setAccessibilityElement on the corresponding NSView.
We also recommend using NSTextView for implementing text editing, as it should provide the required accessibility functionality out of the box. Otherwise, the custom view must adopt NSAccessibilityNavigableStaticText protocol, post notifications about its value and layout changes, and additionally implement a few more accessibility methods:
accessibilitySelectedTextRange()
setAccessibilitySelectedTextRange()
For multipage interfaces each page needs to satisfy the requirements above and additionally implement:
accessibilitySharedCharactersRange()
accessibilitySharedTextUIElements()
You can use the Accessibility Inspector tool (Main menu > Xcode > Open Developer Tool > Accessibility Inspector) to see how your application is represented in the accessibility system.
Note: If your app is Electron-based, we mainly support Electron 12+ for applications available in the App Store and Electron 16+ for other applications.
Grammarly’s browser plugin mainly supports textarea and div elements with contenteditable=”true.” Grammarly doesn't work in input fields.
Note: Our product also requires custom integration for cases of iFrame usage. If your text fields are using iFrame, please contact us by submitting a request here, and we will help you with the issue.