Skip to content

Commit 496276a

Browse files
Merge pull request #1648 from syncfusion-content/EJ2-986927-pdfviewerH
986927: UG Docs Revamp: Annotation Events, Toolbar Restructure & Feature Enhancements for TS and Vue Platform
2 parents 31f8eb7 + 3ba60cf commit 496276a

File tree

282 files changed

+21995
-6393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+21995
-6393
lines changed

Document-Processing-toc.html

Lines changed: 98 additions & 31 deletions
Large diffs are not rendered by default.

Document-Processing/PDF/PDF-Viewer/javascript-es6/accessibility.md

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
---
22
layout: post
3-
title: Accessibility in Typescript Pdfviewer control | Syncfusion
4-
description: Learn here all about accessibility in Syncfusion Typescript Pdfviewer control of Syncfusion Essential JS 2 and more.
3+
title: Accessibility in TypeScript PDF Viewer | Syncfusion
4+
description: Learn about accessibility in the Syncfusion TypeScript PDF Viewer, including compliance with WCAG 2.2, Section 508, ADA and keyboard navigation support.
55
platform: document-processing
66
control: PDF Viewer
7-
publishingplatform: Typescript
87
documentation: ug
98
domainurl: ##DomainURL##
109
---
1110

12-
# Accessibility in Syncfusion PDF Viewer components
11+
# Accessibility in Syncfusion PDF Viewer control TypeScript
1312

14-
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.
13+
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.
1514

16-
The accessibility compliance for the PDF Viewer component is outlined below.
15+
The accessibility compliance for the PDF Viewer component is summarized below.
1716

1817
| Accessibility Criteria | Compatibility |
1918
| -- | -- |
@@ -39,29 +38,31 @@ The accessibility compliance for the PDF Viewer component is outlined below.
3938

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

41+
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.
42+
4243
## WAI-ARIA attributes
4344

44-
[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:
45+
[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:
4546

4647
| Attributes | Purpose |
4748
| --- | --- |
4849
| `aria-disabled`| Indicates whether the PDF Viewer component is in a disabled state or not.|
49-
| `aria-expanded`| Indicates whether the suggestion list has expanded or not. |
50-
| `aria-readonly` | Indicates the readonly state of the PDF Viewer element. |
51-
| `aria-haspopup` | Indicates whether the PDF Viewer input element has a suggestion list or not. |
52-
| `aria-label` | Indicates the breadcrumb item text. |
53-
| `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. |
54-
| `aria-describedby` | This attribute points to the PDF Viewer element describing the one it's set on. |
55-
| `aria-orientation` | Indicates whether the PDF Viewer element is oriented horizontally or vertically. |
56-
| `aria-valuetext` | Returns the current text of the PDF Viewer. |
57-
| `aria-valuemax` | Indicates the Maximum value of the PDF Viewer. |
58-
| `aria-valuemin` | Indicates the Minimum value of the PDF Viewer. |
59-
| `aria-valuenow` | Indicates the current value of the PDF Viewer. |
60-
| `aria-controls` | Attribute is set to the button and it points to the corresponding content. |
50+
| `aria-expanded`| Indicates whether an element within the PDF Viewer is expanded or collapsed. |
51+
| `aria-readonly` | Indicates the read-only state of a PDF Viewer element. |
52+
| `aria-haspopup` | Indicates the presence of a popup, such as a context menu or submenu. |
53+
| `aria-label` | Provides a human-readable label for interactive elements in the PDF Viewer. |
54+
| `aria-labelledby` | Identifies the element(s) that label the PDF Viewer, often referencing the title element. |
55+
| `aria-describedby` | Identifies the element(s) that describe the PDF Viewer or its controls. |
56+
| `aria-orientation` | Indicates whether an element is oriented horizontally or vertically. |
57+
| `aria-valuetext` | Provides a human-readable text alternative for the current value of a range-type element. |
58+
| `aria-valuemax` | Specifies the maximum value of a range-type element. |
59+
| `aria-valuemin` | Specifies the minimum value of a range-type element. |
60+
| `aria-valuenow` | Specifies the current value of a range-type element. |
61+
| `aria-controls` | Identifies the element(s) controlled by the current element. |
6162

6263
## Keyboard interaction
6364

64-
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.
65+
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.
6566

6667
| **Press (Windows)** |**Press (Macintosh)** | **To do this** |
6768
| --- | --- | --- |
@@ -70,7 +71,7 @@ The PDF Viewer component followed the [keyboard interaction](https://www.w3.org/
7071
| <kbd>CONTROL + Right Arrow (or) CONTROL + Down Arrow</kbd> |<kbd>COMMAND + Right Arrow (or) COMMAND + Down Arrow</kbd> |Navigate to the last page |
7172
|<kbd>Left Arrow</kbd> |<kbd> Left Arrow (or) Shift + Space </kbd> |Navigate to the previous page|
7273
| <kbd>Right Arrow</kbd> | <kbd>Right Arrow (or) Space</kbd> | Navigate to the next page |
73-
| <kbd>CONTROL + G</kbd> | <kbd>COMMAND + G</kbd> | Go To The Page|
74+
| <kbd>CONTROL + G</kbd> | <kbd>COMMAND + G</kbd> | Go to a specific page|
7475
|<kbd>Up Arrow</kbd> |<kbd>Up Arrow </kbd> |Scroll up|
7576
| <kbd>Down Arrow</kbd> | <kbd>Down Arrow</kbd> | Scroll down|
7677
|||**Shortcuts for Zooming**|
@@ -86,7 +87,7 @@ The PDF Viewer component followed the [keyboard interaction](https://www.w3.org/
8687
|||**Shortcuts for the general operation**|
8788
| <kbd>CONTROL + Z</kbd> | <kbd>CONTROL + Z</kbd> |Undo the action|
8889
|<kbd>CONTROL + Y</kbd> |<kbd>CONTROL + Y</kbd> |Redo the action|
89-
| <kbd>CONTROL + P</kbd> | <kbd>COMMAND + P(or) </kbd> |Print the document|
90+
| <kbd>CONTROL + P</kbd> | <kbd>COMMAND + P</kbd> |Print the document|
9091
|<kbd>Delete</kbd> |<kbd>Delete</kbd> |Delete the annotations and form fields|
9192
|<kbd>CONTROL + Shift + A</kbd> |<kbd>COMMAND + Shift + A</kbd> |Toggle Annotation Toolbar|
9293
|<kbd>CONTROL + Alt + 0</kbd> |<kbd>COMMAND + Option + 0</kbd> |Show Command panel|
@@ -96,15 +97,7 @@ The PDF Viewer component followed the [keyboard interaction](https://www.w3.org/
9697
|<kbd>Shift + H</kbd> |<kbd>Shift + H</kbd> |Enable pan mode|
9798
|<kbd>Shift + V</kbd> |<kbd>Shift + V</kbd> |Enable text selection mode|
9899

99-
The current implementation of our PDF Viewer includes keyboard shortcuts for various functions like scrolling, zooming, text search, printing, and annotation deletion.
100-
101-
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.
102-
103-
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.
104-
105-
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`.
106-
107-
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.
100+
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.
108101

109102
```html
110103
<!DOCTYPE html>
@@ -161,7 +154,7 @@ PdfViewer.Inject(
161154

162155
let pdfviewer: PdfViewer = new PdfViewer({
163156
documentPath:'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf',
164-
resourceUrl:"https://cdn.syncfusion.com/ej2/24.1.41/dist/ej2-pdfviewer-lib"
157+
resourceUrl:"https://cdn.syncfusion.com/ej2/31.1.23/dist/ej2-pdfviewer-lib"
165158
});
166159
pdfviewer.commandManager = {
167160
keyboardCommand: [{
@@ -259,18 +252,15 @@ pdfviewer.appendTo('#PdfViewer');
259252
{% endhighlight %}
260253
{% endtabs %}
261254

262-
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.
263-
264-
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.
265-
266-
Additionally, there's an explanation of the key modifiers used in the gestures:
255+
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.
267256

268-
Ctrl corresponds to the Control key, represented by the value `1`.
269-
Alt corresponds to the Alt key, represented by the value `2`.
270-
Shift corresponds to the Shift key, represented by the value `4`.
271-
Meta corresponds to the Command key on macOS or the Windows key on Windows, represented by the value `8`.
257+
Key modifiers used in gestures:
258+
- Ctrl corresponds to the Control key (value `1`).
259+
- Alt corresponds to the Alt key (value `2`).
260+
- Shift corresponds to the Shift key (value `4`).
261+
- Meta corresponds to the Command key on macOS or the Windows key on Windows (value `8`).
272262

273-
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.
263+
This setup enables users to perform custom actions within the PDF Viewer by pressing specific key combinations, improving navigation and interaction efficiency.
274264

275265
## Ensuring accessibility
276266

0 commit comments

Comments
 (0)