Remove accessible slide status when printing to PDF

This commit is contained in:
quilicicf 2020-03-12 16:14:14 +01:00
parent 6564950c28
commit ffac5fe696
No known key found for this signature in database
GPG Key ID: 0561A23A57B55DE1
5 changed files with 12 additions and 6 deletions

View File

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

5
dist/print/pdf.css vendored
View File

@ -9,7 +9,8 @@ html.print-pdf {
/* Slide backgrounds are placed inside of their slide when exporting to PDF */ /* Slide backgrounds are placed inside of their slide when exporting to PDF */
/* Display slide speaker notes when 'showNotes' is enabled */ /* Display slide speaker notes when 'showNotes' is enabled */
/* Layout option which makes notes appear on a separate page */ /* 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 * { html.print-pdf * {
-webkit-print-color-adjust: exact; } -webkit-print-color-adjust: exact; }
html.print-pdf { html.print-pdf {
@ -122,3 +123,5 @@ html.print-pdf {
display: block; display: block;
position: absolute; position: absolute;
font-size: 14px; } font-size: 14px; }
html.print-pdf .aria-status {
display: none; }

2
dist/reveal.css vendored
View File

@ -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 * https://revealjs.com
* MIT licensed * MIT licensed
* *

2
dist/reveal.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -292,8 +292,6 @@ export default function( revealElement, options ) {
statusElement.style.position = 'absolute'; statusElement.style.position = 'absolute';
statusElement.style.height = '1px'; statusElement.style.height = '1px';
statusElement.style.width = '1px'; statusElement.style.width = '1px';
statusElement.style.top = '-1px';
statusElement.style.left = '-1px';
statusElement.style.overflow = 'hidden'; statusElement.style.overflow = 'hidden';
statusElement.style.clip = 'rect( 1px, 1px, 1px, 1px )'; statusElement.style.clip = 'rect( 1px, 1px, 1px, 1px )';
statusElement.classList.add( 'aria-status' ); 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 // 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}' ); 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.width = pageWidth + 'px';
document.body.style.height = pageHeight + 'px'; document.body.style.height = pageHeight + 'px';