diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/accessibility.md b/Document-Processing/PDF/PDF-Viewer/blazor/accessibility.md index f82deba6f2..963265d37c 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/accessibility.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/accessibility.md @@ -1,13 +1,13 @@ --- layout: post title: Keyboard accessibility in Blazor SfPdfViewer Component | Syncfusion -description: Checkout and learn here all about Keyboard accessibility in Syncfusion Blazor SfPdfViewer component and more. +description: Checkout and learn here all about Keyboard accessibility in Blazor SfPdfViewer component and more. platform: document-processing control: SfPdfViewer documentation: ug --- -# Accessibility in Syncfusion® Blazor SfPdfViewer +# Keyboard accessibility in Blazor SfPdfViewer The Blazor SfPdfViewer component follows established accessibility guidelines and standards, including the [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), which are commonly used to evaluate accessibility. The accessibility compliance for the Blazor SfPdfViewer component is outlined below. @@ -94,7 +94,7 @@ The Blazor SfPdfViewer component follows the [keyboard interaction](https://www. ## Ensuring accessibility -The Blazor SfPdfViewer component's accessibility levels are ensured through an [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) with playwright tests. +The Blazor SfPdfViewer component's accessibility is validated using [axe-core](https://www.nuget.org/packages/Deque.AxeCore.Playwright) with Playwright tests. The accessibility compliance of the Blazor SfPdfViewer component is demonstrated in the following sample. Open the [SfPdfViewer accessibility sample](https://blazor.syncfusion.com/accessibility/sfpdfviewer) in a new window to evaluate the accessibility of the Blazor SfPdfViewer component with accessibility tools. diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/accessible-pdf-reading.md b/Document-Processing/PDF/PDF-Viewer/blazor/accessible-pdf-reading.md index c597669ec4..d47aadc338 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/accessible-pdf-reading.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/accessible-pdf-reading.md @@ -27,9 +27,11 @@ Use Microsoft Edge’s built-in Read Aloud to listen to the PDF content. - To start from a specific page, navigate to that page and click anywhere; reading begins from the first readable text at that location. - To read only selected text, select the sentence or portion of text you want, then use Read Aloud to read just that selection. +The following steps describe a custom Read Aloud implementation that is triggered when text is selected in the Blazor PDF Viewer. + **Step 1:** Create and add a JavaScript file to the app and reference it in the head element. -```cshtml +```html
@@ -217,7 +219,7 @@ function insertSrNode(div) { } return sr; } -// Select SR text for screen reader - Mircosoft Reader +// Select SR text for screen reader - Microsoft Edge’s Screen Reader function selectSrText(div) { const sr = insertSrNode(div); const selection = window.getSelection(); @@ -226,7 +228,7 @@ function selectSrText(div) { selection.removeAllRanges(); selection.addRange(range); } -// Move caret to first visible text node - Mircosoft Reader +// Move caret to first visible text node - Microsoft Edge’s Screen Reader function collapseCaretToVisibleText(div) { const textLayer = div.querySelector('.e-pv-text-layer'); if (textLayer) { @@ -238,7 +240,7 @@ function collapseCaretToVisibleText(div) { selection.addRange(range); } } -// Focus page for accessibility - Mircosoft Reader +// Focus page for accessibility - Microsoft Edge’s Screen Reader function focusPageDiv(div) { if (!div) return; const textLayer = div.querySelector('.e-pv-text-layer'); @@ -251,7 +253,7 @@ function focusPageDiv(div) { selectSrText(div); collapseCaretToVisibleText(div); } -// Wire accessibility handlers to page div - Mircosoft Reader +// Wire accessibility handlers to page div - Microsoft Edge’s Screen Reader function wirePage(div) { if (!div || div.hasAttribute('data-a11y-init')) return; div.addEventListener('mousedown', () => focusPageDiv(div)); @@ -259,13 +261,13 @@ function wirePage(div) { div.setAttribute('data-a11y-init', 'true'); } -// Reader the selected text aloud - Mircosoft Reader +// Read the selected text aloud - Microsoft Edge’s Screen Reader function readAloudText(text) { window.speechSynthesis.cancel(); speakFromControls(text); } -// Cancel speech and remove highlights - Mircosoft Reader +// Cancel speech and remove highlights - Microsoft Edge’s Screen Reader function cancelReading() { if (window.speechSynthesis?.speaking) { window.speechSynthesis.cancel(); @@ -275,7 +277,7 @@ function wirePage(div) { {% endhighlight %} {% endtabs %} -**Step 3:** Add the following code to the `Home.razor` +**Step 3:** Add the following code to the `Home.razor` file. {% tabs %} {% highlight razor tabtitle="~/Home.razor" %} @@ -330,14 +332,14 @@ function wirePage(div) { ## Windows Speech Synthesis API Use the browser’s Windows Speech Synthesis API (speechSynthesis) to implement in-app Read Aloud functionality with custom controls. This approach: -- Provides playback controls, including Play and Pause/Resume. +- Provides playback controls, including Previous, Next, and Pause/Resume. - Reads content line by line and can continue across multiple pages. - Reads only the selected text when a selection is made. - Works on modern browsers and platforms that support the Speech Synthesis API. **Step 1:** Create and add a JavaScript file to the app and reference it in the head element. -```cshtml +```html @@ -737,7 +739,7 @@ function clearAllHighlights() { const speechSynth = window.speechSynthesis; isPaused ? speechSynth.resume() : speechSynth.pause(); } -// Cancel speech and remove highlights - Mircosoft Reader +// Cancel speech and remove highlights - Windows Speech Synthesis API function cancelReading() { if (window.speechSynthesis?.speaking) { window.speechSynthesis.cancel(); @@ -748,7 +750,7 @@ function clearAllHighlights() { {% endhighlight %} {% endtabs %} -**Step 3:** Add the following code to the `Home.razor` +**Step 3:** Add the following code to the `Home.razor` file. {% tabs %} {% highlight razor tabtitle="~/Home.razor" %} @@ -923,4 +925,4 @@ function clearAllHighlights() { ## See also -- [Blazor PDF Viewer example -Accessible PDF Reading](https://document.syncfusion.com/demos/pdf-viewer/blazor-server/pdf-viewer/accessible-pdf-reading?theme=fluent2) +- [Blazor PDF Viewer example - Accessible PDF Reading](https://document.syncfusion.com/demos/pdf-viewer/blazor-server/pdf-viewer/accessible-pdf-reading?theme=fluent2) diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/annotation/create-modify-annotation.md b/Document-Processing/PDF/PDF-Viewer/blazor/annotation/create-modify-annotation.md index 6d2e10a0cd..4c107b0b6d 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/annotation/create-modify-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/annotation/create-modify-annotation.md @@ -3,7 +3,7 @@ layout: post title: Create and modify annotations in Blazor PDF Viewer | Syncfusion description: Learn how to create and modify annotations in Syncfusion Blazor PDF Viewer with UI and programmatic examples, plus quick links to all annotation types. platform: document-processing -control: PDF Viewer +control: SfPdfViewer documentation: ug domainurl: ##DomainURL## --- diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/annotation/delete-annotation.md b/Document-Processing/PDF/PDF-Viewer/blazor/annotation/delete-annotation.md index eed6b6d689..6f68762d69 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/annotation/delete-annotation.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/annotation/delete-annotation.md @@ -3,7 +3,7 @@ layout: post title: Remove annotations in Blazor PDF Viewer | Syncfusion description: Learn how to remove/delete PDF annotations in Syncfusion Blazor PDF Viewer using UI options (context menu, toolbar, Delete key) and programmatic APIs. platform: document-processing -control: PDF Viewer +control: SfPdfViewer documentation: ug domainurl: ##DomainURL## --- diff --git a/Document-Processing/PDF/PDF-Viewer/blazor/command-manager.md b/Document-Processing/PDF/PDF-Viewer/blazor/command-manager.md index ec1f50bff3..ca6ae1650d 100644 --- a/Document-Processing/PDF/PDF-Viewer/blazor/command-manager.md +++ b/Document-Processing/PDF/PDF-Viewer/blazor/command-manager.md @@ -1,7 +1,7 @@ --- layout: post title: Command Manager in Blazor SfPdfViewer Component | Syncfusion -description: Learn how to configure the Command Manager to add custom keyboard shortcuts and handle command execution in the Syncfusion Blazor PDF Viewer. +description: Learn how to configure the Command Manager to add custom keyboard shortcuts and handle command execution in the Blazor PDF Viewer. platform: document-processing control: SfPdfViewer documentation: ug @@ -48,39 +48,38 @@ The following example registers two custom keyboard commands (`FitToWidth` and ` SfPdfViewer2 pdfViewer; public string DocumentPath { get; set; } = "wwwroot/Data/PDF_Succinctly.pdf"; - ///