fix(theme): restore the navigation landmark, the single h1 and the result URL contrast - #3469
Merged
Merged
Conversation
…sult URL contrast Three accessibility regressions of the bootstrap static theme against the JSP search pages: - The header <nav> carried role="banner", which replaced its navigation role, so the page had no navigation landmark. The enclosing <header> is already the banner; drop the role. - The top page had two h1 elements: the visually-hidden page heading and the big logo heading. Hide the page heading on the home view, so the logo is the page's only h1 as on index.jsp; every other view keeps the page heading as its h1. - The result URL (cite) was #009933, 3.75:1 on white, below the WCAG AA 4.5:1 minimum. Use #00852c (4.78:1), the colour of the JSP page. BundledBootstrapThemeTest and app.test.js check all three.
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.
Why
The bootstrap static theme is now the default search UI. Compared with the JSP search pages it regressed on three accessibility points:
<nav>carriedrole="banner", which replaces its implicit navigation role, so the accessibility tree of the top page had no navigation landmark.<h1>on the top page. The visually-hidden page heading and the logo heading (h1.mainLogo) were both exposed.#result .site cite) was#009933, 3.75:1 on white. The JSP page used#00852c, 4.78:1.What changes
index.html: droprole="banner"from the header<nav>; the enclosing<header>is the banner.index.html/app.js: the page heading getsid="page-heading", andshowView()hides it on the home view, whose logo heading is the page'sh1, as onindex.jsp. Every other view keeps the page heading as its onlyh1.styles.css: the result URL uses#00852c.BundledBootstrapThemeTestchecks the nav role, the heading id and the cite contrast (the contrast test fails on main);app.test.jschecks the heading is hidden on the home view only.The theme version stays 1.3.0: it was set for 15.9 and has not been released yet.
Verification
mvn test -Dtest=BundledBootstrapThemeTest: 127 tests passed.src/test/js,npx vitest run): 572 passed.h1in the accessibility tree, top pageFess Search×2)h1, results page#009933, 3.75:1#00852c, 4.78:1