Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b912b64
984540: JS annotation module documentation revamp
BalajiLoganathanSF4826 Oct 15, 2025
939424d
984540: JS form designer module documentation revamp
BalajiLoganathanSF4826 Oct 15, 2025
cb2ff96
984540: JS open pdf file module documentation revamp
BalajiLoganathanSF4826 Oct 15, 2025
da4853e
984540: JS save pdf file module documentation revamp
BalajiLoganathanSF4826 Oct 15, 2025
9f074ba
984540: JS server deployment module documentation revamp
BalajiLoganathanSF4826 Oct 15, 2025
0050a2c
984540: JS common files documentation revamp
BalajiLoganathanSF4826 Oct 16, 2025
5c9a9bb
984540: JS style and appearance module documentation revamp
BalajiLoganathanSF4826 Oct 16, 2025
5b72968
984540: JS troubleshooting module documentation revamp
BalajiLoganathanSF4826 Oct 16, 2025
caecd92
984540: JS how-to module documentation revamp
BalajiLoganathanSF4826 Oct 16, 2025
61de2f3
984540: JS documentation restructuring - navigation module
BalajiLoganathanSF4826 Oct 23, 2025
af26ff4
984540: JS documentation restructuring - toolbar module
BalajiLoganathanSF4826 Oct 23, 2025
a6cf403
984540: JS documentation restructuring - page organizer module
BalajiLoganathanSF4826 Oct 23, 2025
59d73f7
984540: JS documentation restructuring - images and common files
BalajiLoganathanSF4826 Oct 23, 2025
89348b0
984540: JS documentation restructuring - delete additional form desig…
BalajiLoganathanSF4826 Oct 24, 2025
eb0fc51
984540: JS documentation restructuring - Resolved front matter and sp…
BalajiLoganathanSF4826 Oct 24, 2025
fc92152
984540: JS documentation restructuring - Resolved front matter errors
BalajiLoganathanSF4826 Oct 24, 2025
b125de9
984540: Updated file paths for JS ES5 in toc
BalajiLoganathanSF4826 Oct 24, 2025
05650b5
984540: Updated file paths for JS ES5 in toc
BalajiLoganathanSF4826 Oct 24, 2025
6ece6e4
Merge branch 'development' into EJ2-984540-pv-js-docs
BalajiLoganathanSF4826 Oct 24, 2025
8c3e77e
984540: Resolved CI failure
BalajiLoganathanSF4826 Oct 24, 2025
656295e
984540: Resolved CI errors
BalajiLoganathanSF4826 Oct 27, 2025
915b9ae
984540: JS docs revamp: Updated versions, resolved errors in toc file…
BalajiLoganathanSF4826 Oct 27, 2025
a1e682f
984540: JS docs revamp: Resolved errors in toc file
BalajiLoganathanSF4826 Oct 27, 2025
fafba02
984540: JS docs revamp: Resolved "PDF Viewer" Spelling errors
BalajiLoganathanSF4826 Oct 27, 2025
8102aca
Merge branch 'development' into EJ2-984540-pv-js-docs
BalajiLoganathanSF4826 Oct 27, 2025
ffd6d18
984540: JS docs revamp: Reverted changes to navigation.md, organize-p…
BalajiLoganathanSF4826 Oct 27, 2025
dfe9075
984540: Resolved front matter errors
BalajiLoganathanSF4826 Oct 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions Document-Processing-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,24 @@
</ul>
</li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/toolbar">Toolbar</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/mobile-toolbar">Mobile Toolbar Interface</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/navigation">Navigation</a></li>
<li>Toolbar Customization
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/toolbar-customization/primary-toolbar-customization">Primary Toolbar</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/toolbar-customization/annotation-toolbar-customization">Annotation Toolbar</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/toolbar-customization/form-designer-toolbar-customization">Form Designer Toolbar</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/organize-pdf/toolbar-organize-page">Organize Page Toolbar</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/toolbar-customization/mobile-toolbar">Mobile Toolbar</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/toolbar-customization/custom-toolbar">Custom Toolbar</a></li>
</ul>
</li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/navigation">Interactive PDF Navigation</a>
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/interactive-pdf-navigation/page-navigation">Page </a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/interactive-pdf-navigation/bookmark-navigation">Bookmark</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/interactive-pdf-navigation/page-thumbnail-navigation">Page Thumbnail</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/interactive-pdf-navigation/hyperlink-navigation">Hyperlink Navigation</a></li>
</ul>
</li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/magnification">Magnification</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/accessibility">Accessibility</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/text-search">Text Search</a></li>
Expand All @@ -975,19 +991,35 @@
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/annotations/line-angle-constraints">Line Angle Constraint</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/annotations/comments">Comments</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/annotations/signature-annotation">Handwritten signature</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/annotations/annotation-event">Annotations Events</a></li>
</ul>
</li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/interaction-mode">Interaction Mode</a></li>
<li>Form Designer
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/form-designer/create-programmatically">Create form fields programmatically</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/form-designer/create-with-user-interface-interaction">Create form fields with UI interaction</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/toolbar-customization/form-designer-toolbar-customization">Form Designer Toolbar</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/form-designer/form-field-events">Form Field events</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/custom-fonts">Custom fonts</a></li>
</ul>
</li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/form-filling">Form Filling</a></li>
<li>Organize Pages
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/organize-pdf-overview">Overview</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/organize-pdf/programmatic-support-for-organize-page">Programmatic Support</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/organize-pdf/ui-interactions-organize-page">UI Interactions</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/organize-pdf/toolbar-organize-page">Toolbar</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/organize-pdf/organize-page-mobile-view">Mobile View</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/organize-pdf/organize-pdf-events">Events</a></li>
</ul>
</li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/organize-pdf">Organize Pages</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/print">Print</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/download">Download</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/event">Event</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/textselection">Text Selection</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/globalization">Globalization</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/ej1-api-migration">Migration from Essential JS 1</a></li>
<li>Server Deployment
Expand All @@ -998,7 +1030,7 @@
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/server-deployment/how-to-deploy-pdfviewer-server-app-in-azure-app-service-from-visual-studio">How to Deploy PdfViewer Server App in Azure App Service from Visual Studio</a></li>
</ul>
</li>
<li>How To
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to-overview">How to</a>
<ul>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/create-pdfviewer-service">Create PDF Viewer Service in ASPNET MVC</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/create-pdfviewer-service-core">Create PDF Viewer Service in ASPNET Core</a></li>
Expand Down Expand Up @@ -1049,6 +1081,10 @@
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/extract-text-js">Extract Text</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/enable-text-selection-js">Dynamically Enable or Disable Text Selection</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/show-hide-annotation-js">Show and Hide Annotation</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/download-document-on-window-closing">Download PDF document on closing browser window</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/focus-on-a-form-field-after-loading">Focus on a form field on document load</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/use-local-script-and-style-references">Use local script and style references</a></li>
<li><a href="/document-processing/pdf/pdf-viewer/javascript-es5/how-to/add-new-page-to-the-pdf-document">Add new page to PDF document</a></li>
</ul>
</li>
<li>Troubleshooting
Expand Down
74 changes: 31 additions & 43 deletions Document-Processing/PDF/PDF-Viewer/javascript-es5/accessibility.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
---
layout: post
title: Accessibility in Javascript Pdfviewer control | Syncfusion
description: Learn here all about accessibility in Syncfusion Javascript Pdfviewer control of Syncfusion Essential JS 2 and more.
title: Accessibility in JavaScript PDF Viewer | Syncfusion
description: Learn about accessibility in Syncfusion JavaScript PDF Viewer - WCAG 2.2, Section 508, ADA, and keyboard navigation support.
platform: document-processing
control: PDF Viewer
publishingplatform: Javascript
documentation: ug
domainurl: ##DomainURL##
---

# Accessibility in Syncfusion PDF Viewer components
# Accessibility in Syncfusion JavaScript ES5 PDF Viewer components

The PDF Viewer component followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility.
The PDF Viewer component follows established accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/), and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility.

The accessibility compliance for the PDF Viewer component is outlined below.
The accessibility compliance for the PDF Viewer component is summarized below.

| Accessibility Criteria | Compatibility |
| -- | -- |
Expand All @@ -39,30 +38,31 @@ The accessibility compliance for the PDF Viewer component is outlined below.

<div><img src="https://cdn.syncfusion.com/content/images/documentation/not-supported.png" alt="No"> - The component does not meet the requirement.</div>

Note: Mobile device support is marked as partial due to platform-level constraints on hover interactions, complex keyboard navigation, and screen reader capabilities that vary by device and browser.

## WAI-ARIA attributes

[WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/alert/) (Accessibility Initiative – Accessible Rich Internet Applications) defines a way to increase the accessibility of web pages, dynamic content, and user interface components developed with Ajax, HTML, JavaScript,and related technologies. ARIA provides additional semantics to describe the role, state, and functionality of web components. The following ARIA attributes are used in the PDF Viewer component:
[WAI-ARIA](https://www.w3.org/WAI/ARIA/apg/patterns/alert/) (Accessibility Initiative – Accessible Rich Internet Applications) defines a way to increase the accessibility of web pages, dynamic content, and user interface components developed with Ajax, HTML, JavaScript, and related technologies. ARIA provides additional semantics to describe the role, state, and functionality of web components. The following ARIA attributes are used in the PDF Viewer component:

| Attributes | Purpose |
| --- | --- |
| `aria-disabled`| Indicates whether the PDF Viewer component is in a disabled state or not.|
| `aria-expanded`| Indicates whether the suggestion list has expanded or not. |
| `aria-readonly` | Indicates the readonly state of the PDF Viewer element. |
| `aria-haspopup` | Indicates whether the PDF Viewer input element has a suggestion list or not. |
| `aria-label` | Indicates the breadcrumb item text. |
| `aria-labelledby` | Provides a label for the PDF Viewer. Typically, the "aria-labelledby" attribute will contain the id of the element used as the PDF Viewer's title. |
| `aria-describedby` | This attribute points to the PDF Viewer element describing the one it's set on. |
| `aria-orientation` | Indicates whether the PDF Viewer element is oriented horizontally or vertically. |
| `aria-valuetext` | Returns the current text of the PDF Viewer. |
| `aria-valuemax` | Indicates the Maximum value of the PDF Viewer. |
| `aria-valuemin` | Indicates the Minimum value of the PDF Viewer. |
| `aria-valuenow` | Indicates the current value of the PDF Viewer. |
| `aria-controls` | Attribute is set to the button and it points to the corresponding content. |

| `aria-expanded`| Indicates whether an element within the PDF Viewer is expanded or collapsed. |
| `aria-readonly` | Indicates the read-only state of a PDF Viewer element. |
| `aria-haspopup` | Indicates the presence of a popup, such as a context menu or submenu. |
| `aria-label` | Provides a human-readable label for interactive elements in the PDF Viewer. |
| `aria-labelledby` | Identifies the element(s) that label the PDF Viewer, often referencing the title element. |
| `aria-describedby` | Identifies the element(s) that describe the PDF Viewer or its controls. |
| `aria-orientation` | Indicates whether an element is oriented horizontally or vertically. |
| `aria-valuetext` | Provides a human-readable text alternative for the current value of a range-type element. |
| `aria-valuemax` | Specifies the maximum value of a range-type element. |
| `aria-valuemin` | Specifies the minimum value of a range-type element. |
| `aria-valuenow` | Specifies the current value of a range-type element. |
| `aria-controls` | Identifies the element(s) controlled by the current element. |

## Keyboard interaction

The PDF Viewer component followed the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/alert/#keyboardinteraction) guideline, making it easy for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Message component.
The PDF Viewer component follows the [keyboard interaction](https://www.w3.org/WAI/ARIA/apg/patterns/alert/#keyboardinteraction) guideline, making it easy for people who use assistive technologies (AT) and those who rely on keyboard navigation. The following keyboard shortcuts are supported by the PDF Viewer component.

| **Press (Windows)** |**Press (Macintosh)** | **To do this** |
| --- | --- | --- |
Expand All @@ -71,7 +71,7 @@ The PDF Viewer component followed the [keyboard interaction](https://www.w3.org/
| <kbd>CONTROL + Right Arrow (or) CONTROL + Down Arrow</kbd> |<kbd>COMMAND + Right Arrow (or) COMMAND + Down Arrow</kbd> |Navigate to the last page |
|<kbd>Left Arrow</kbd> |<kbd> Left Arrow (or) Shift + Space </kbd> |Navigate to the previous page|
| <kbd>Right Arrow</kbd> | <kbd>Right Arrow (or) Space</kbd> | Navigate to the next page |
| <kbd>CONTROL + G</kbd> | <kbd>COMMAND + G</kbd> | Go To The Page|
| <kbd>CONTROL + G</kbd> | <kbd>COMMAND + G</kbd> | Go to a specific page|
|<kbd>Up Arrow</kbd> |<kbd>Up Arrow </kbd> |Scroll up|
| <kbd>Down Arrow</kbd> | <kbd>Down Arrow</kbd> | Scroll down|
|||**Shortcuts for Zooming**|
Expand All @@ -97,16 +97,7 @@ The PDF Viewer component followed the [keyboard interaction](https://www.w3.org/
|<kbd>Shift + H</kbd> |<kbd>Shift + H</kbd> |Enable pan mode|
|<kbd>Shift + V</kbd> |<kbd>Shift + V</kbd> |Enable text selection mode|

The current implementation of our PDF Viewer includes keyboard shortcuts for various functions like scrolling, zooming, text search, printing, and annotation deletion.

To enhance user experience, we're adding additional keyboard shortcuts for actions such as navigating between pages, accessing specific pages, toggling annotation tools, and displaying PDF elements like outlines, annotations, bookmarks, and thumbnails.

To support this, we're introducing a new class called **commandManager**, which handles custom commands triggered by specific key gestures. These custom commands will be defined by users and executed accordingly.

The **commandManager** will have a parameter called Commands, which will hold the collection of custom keyboard commands specified by users. Each custom command will be represented by a KeyboardCommand class, containing the `command name` and associated `keyboard combination`.

Additionally, we're introducing the **keyboardCustomCommands** parameter for the CommandManager, which will utilize the EventCallback to handle keyboard events and trigger appropriate methods when specific key combinations are pressed.

The PDF Viewer supports custom keyboard commands through a `commandManager`, which handles commands triggered by specific key gestures. Custom commands are defined by users and executed accordingly. The `commandManager` includes a `keyboardCommand` collection to hold custom keyboard commands. Each custom command is represented by a `KeyboardCommand` entry, containing the command name and associated keyboard combination. Additionally, the `keyboardCustomCommands` parameter utilizes an event callback to handle keyboard events and trigger methods when specific key combinations are pressed.
{% tabs %}
{% highlight html tabtitle="Standalone" %}

Expand Down Expand Up @@ -140,7 +131,7 @@ Additionally, we're introducing the **keyboardCustomCommands** parameter for the
var viewer = new ej.pdfviewer.PdfViewer({
//Sets the document path for initial loading
documentPath: 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf',
resourceUrl: "https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib"
resourceUrl: "https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib"
});
//Inject the dependencies required to render the PDF Viewer
ej.pdfviewer.PdfViewer.Inject(
Expand Down Expand Up @@ -266,18 +257,15 @@ viewer.commandManager = {
{% endhighlight %}
{% endtabs %}

Each `keyboardCommand` object consists of a name property, specifying the `name` of the `custom command`, and a `gesture property`, defining the key gesture associated with the command.

For example, the first command named `customCopy` is associated with the **G** key and requires both the **Shift** and **Alt** modifier keys to be pressed simultaneously.

Additionally, there's an explanation of the key modifiers used in the gestures:
Each `keyboardCommand` object consists of a `name` property for the custom command and a `gesture` property defining the key gesture associated with the command. For example, the `customCopy` command is associated with the G key and requires both the Shift and Alt modifier keys to be pressed simultaneously.

* Ctrl corresponds to the Control key, represented by the value `1`.
* Alt corresponds to the Alt key, represented by the value `2`.
* Shift corresponds to the Shift key, represented by the value `4`.
* Meta corresponds to the Command key on macOS or the Windows key on Windows, represented by the value `8`.
Key modifiers used in gestures:
- Ctrl corresponds to the Control key (value `1`).
- Alt corresponds to the Alt key (value `2`).
- Shift corresponds to the Shift key (value `4`).
- Meta corresponds to the Command key on macOS or the Windows key on Windows (value `8`).

This setup allows users to perform custom actions within the PDF viewer by pressing specific key combinations, enhancing the user experience and providing more efficient navigation and interaction options.
This setup enables users to perform custom actions within the PDF Viewer by pressing specific key combinations, improving navigation and interaction efficiency.

## Ensuring accessibility

Expand Down
Loading