Răsfoiți Sursa

Remove accessible slide status when printing to PDF

quilicicf 5 ani în urmă
părinte
comite
ffac5fe696
5 a modificat fișierele cu 11 adăugiri și 5 ștergeri
  1. 5 0
      css/print/pdf.scss
  2. 4 1
      dist/print/pdf.css
  3. 1 1
      dist/reveal.css
  4. 0 0
      dist/reveal.min.js
  5. 1 3
      js/reveal.js

+ 5 - 0
css/print/pdf.scss

@@ -164,4 +164,9 @@ html.print-pdf {
 		position: absolute;
 		font-size: 14px;
 	}
+
+	/* This accessibility tool is not useful in PDF and breaks it visually */
+	.aria-status {
+		display: none;
+	}
 }

+ 4 - 1
dist/print/pdf.css

@@ -9,7 +9,8 @@ html.print-pdf {
   /* Slide backgrounds are placed inside of their slide when exporting to PDF */
   /* Display slide speaker notes when 'showNotes' is enabled */
   /* Layout option which makes notes appear on a separate page */
-  /* Display slide numbers when 'slideNumber' is enabled */ }
+  /* Display slide numbers when 'slideNumber' is enabled */
+  /* This accessibility tool is not useful in PDF and breaks it visually */ }
   html.print-pdf * {
     -webkit-print-color-adjust: exact; }
   html.print-pdf {
@@ -122,3 +123,5 @@ html.print-pdf {
     display: block;
     position: absolute;
     font-size: 14px; }
+  html.print-pdf .aria-status {
+    display: none; }

+ 1 - 1
dist/reveal.css

@@ -1,5 +1,5 @@
 /*!
-* reveal.js 4.0.0-dev (Wed Mar 11 2020)
+* reveal.js 4.0.0-dev (Thu Mar 12 2020)
 * https://revealjs.com
 * MIT licensed
 *

Fișier diff suprimat deoarece este prea mare
+ 0 - 0
dist/reveal.min.js


+ 1 - 3
js/reveal.js

@@ -292,8 +292,6 @@ export default function( revealElement, options ) {
 			statusElement.style.position = 'absolute';
 			statusElement.style.height = '1px';
 			statusElement.style.width = '1px';
-			statusElement.style.top = '-1px';
-			statusElement.style.left = '-1px';
 			statusElement.style.overflow = 'hidden';
 			statusElement.style.clip = 'rect( 1px, 1px, 1px, 1px )';
 			statusElement.classList.add( 'aria-status' );
@@ -370,7 +368,7 @@ export default function( revealElement, options ) {
 		// Limit the size of certain elements to the dimensions of the slide
 		createStyleSheet( '.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' );
 
-		document.querySelector('html').classList.add( 'print-pdf' );
+		document.documentElement.classList.add( 'print-pdf' );
 		document.body.style.width = pageWidth + 'px';
 		document.body.style.height = pageHeight + 'px';
 

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff