Skip to content

Commit

Permalink
Merge pull request #5052 from open-formulieren/a11y/4622-textual-alte…
Browse files Browse the repository at this point in the history
…rnative-for-pdf-logo

Accessible textual alternative for PDF logo
  • Loading branch information
sergei-maertens authored Feb 5, 2025
2 parents 27c390d + d9b2299 commit c70e33f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/openforms/scss/pdfs/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
@import 'metadata';
@import 'submission-step';
@import 'submission-step-row';
@import 'screen-reader';
@import 'payment-info';
@import 'privacy-policy';
10 changes: 10 additions & 0 deletions src/openforms/scss/pdfs/_screen-reader.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@
<header class="header {% if theme.logo %}header--has-logo{% endif %}">
<span
class="header__logo"
{% if theme.logo %}role="img" aria-label="{{ logo_alt }}"{% endif %}
></span>
{% if theme.logo %}role="img"{% endif %}
>
{% if theme.logo %}
<span class="sr-only">
{{ logo_alt }}
</span>
{% endif %}
</span>
</header>

<h1 class="title">{{ report.form.name }}</h1>
Expand Down

0 comments on commit c70e33f

Please sign in to comment.