Repository navigation
Tell screen readers when a pop-up opens on the printing page - #10
Open
charliechinhay wants to merge 1 commit into
Open
charliechinhay wants to merge 1 commit into
charliechinhay wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Fixes #3.
The pop-ups on the printing page were plain
divs, so a screen reader wasn't told that a pop-up had opened or what it was called.Each of the 5 pop-ups in
Source code/server/public/index.htmlnow hasrole="dialog",aria-modal="true"andaria-labelledbypointing at its title:welcomeModalTitle(new)printModalTitle(already there)pvTitle(already there)nameModalTitle(new)helpModalTitle(new)The attributes are on the
.modalbox, not on the.modal-overlaybackdrop, soapp.jsdidn't need any change: the overlay still shows and hides the pop-up, and clicking the backdrop still closes it. The "Print this?" title changes to "Print these N files?" and the large view's to "Page N", andaria-labelledbyalways reads the current text.Test
New
Source code/tests/t18-dialogs.jschecks that every pop-up box on the page is marked as a dialog and that itsaria-labelledbypoints at a title that exists. It counts the boxes against the overlays, so a pop-up added later without these attributes makes it fail. It's listed intests/README.mdand runs inbuild.yml.How I checked it
Screen reader: NVDA 2026.3 with Chrome 156.0.8078.80, Windows 11 Home.
main), NVDA said nothing about a dialog and read straight on into the page behind.manage.html: checked: it has no pop-ups of its own, only the browser'sconfirm()boxes, which screen readers already announce.Not in this pull request