accessibility updates#20
Open
sscott710 wants to merge 1 commit into
Open
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.
Accessibility changes to bring the site within WCAG 2.1 AA standards. These include:
Skip Navigation Link
landmark wrapping page content.Files: baseof.html, list.html, single.html, blog/single.html, maps/list.html, maps/single.html, narratives/list.html, narratives/single.html, app.scss
Change: Added a "Skip to main content" link at the top of every page layout, visually hidden until focused. Added corresponding
WCAG: 2.4.1 Bypass Blocks (Level A)
Heading Hierarchy
Files: single.html, blog/single.html, index.html, maps/list.html, maps/single.html, narratives/list.html, narratives/single.html, header.html
Change: Page titles changed from
<h2>/<h3>/<h4>to<h1>. The site title in the header changed from<h1>to<span>so each page has a single, correct<h1>. Section headings on the homepage changed from<h4>to<h2>.WCAG: 1.3.1 Info and Relationships (Level A), 2.4.6 Headings and Labels (Level AA)
Image Alt Text
Files: footer.html, index.html, maps/list.html, narratives/list.html, all narrative index.md files, blog/2022-03-30-launching-mtu.md, figure.html shortcode
Change: Added descriptive alt attributes to images that previously had missing, empty, or generic alt text (e.g., footer logos, homepage images, narrative/map thumbnail cards, and all figure shortcode usages across narratives). Removed duplicate images with spaces in filenames. For the blog posts, a blank
alt=""was added to be filled in later.WCAG: 1.1.1 Non-text Content (Level A)
Color Contrast
Files: app.scss
Change: Link colors changed from text-sky-600 / text-sky-400 (hover) to text-sky-700 / text-sky-800 (hover) for better contrast against white backgrounds.
WCAG: 1.4.3 Contrast (Minimum) (Level AA)
Keyboard Accessibility — Interactive Map Notations
Files: viz/common/main.js, viz/gmu-lorraine-brown/main.js, viz/mallory-house/main.js, viz/odu-site/main.js, viz/slave-sales/main.js, app.scss
Change: .notation spans (inline map markers in narrative text) received tabindex="0", role="button", and keydown listeners for Enter/Space. Added :focus-visible outline styling.
WCAG: 2.1.1 Keyboard (Level A), 2.4.7 Focus Visible (Level AA)
Keyboard Accessibility — Lightbox
elements. Added Escape key to close, focus management (focus moves into lightbox on open, returns to thumbnail on close), aria-label on open/close links, and :focus-visible outline on the lightbox itself.
Files: index.js, figure.html shortcode, app.scss
Change: Lightbox images changed from CSS background-image to
WCAG: 2.1.1 Keyboard (Level A), 2.4.3 Focus Order (Level A), 2.4.7 Focus Visible (Level AA), 1.1.1 Non-text Content (Level A)
Responsive Mobile Navigation
Files: header.html, index.js
Change: Added a hamburger menu button with aria-expanded, aria-controls, and screen-reader-only label for mobile viewports. Navigation links collapse into a togglable menu on small screens.
WCAG: 4.1.2 Name, Role, Value (Level A), 2.4.7 Focus Visible (Level AA)
Focus Indicator Improvements
Files: maps/gmu-footprints/index.md, maps/odu-footprints/index.md, narratives/single.html
Change: Map Play/Reset buttons and narrative Reset View button changed from outline-none focus:outline-none to focus-visible:ring-2 styles. Radio buttons for basemap selection received aria-label attributes.
WCAG: 2.4.7 Focus Visible (Level AA), 4.1.2 Name, Role, Value (Level A)
External Link Indicators
Files: footer.html, footer-viz.html
Change: External links received
target="_blank"withrel="noopener noreferrer"andscreen-reader-only "(opens in new tab)"text.WCAG: 3.2.5 Change on Request (Level AAA) / best practice per G201
Semantic HTML
Files: maps/list.html, narratives/list.html, index.html
Change:
<card>elements (non-standard) replaced with<article>. Misspelled< figcaption>corrected to<figcaption>on the homepage.WCAG: 1.3.1 Info and Relationships (Level A), 4.1.1 Parsing (Level A)
Navigation Landmark
Files: header.html
Change: Added
aria-label="Main navigation"to the<nav>element.WCAG: 1.3.1 Info and Relationships (Level A)
Map Visualization ARIA
Files: narratives/single.html
Change: The map
<div id="visualization">receivedrole="application"and a dynamic aria-label.WCAG: 4.1.2 Name, Role, Value (Level A)
Slider (Range Input) Usability
Files: app.scss, maps/gmu-footprints/main.js, maps/odu-footprints/main.js
Change: Custom styled slider thumb and track. Thumb turns blue on active/click state. Track fills with blue to indicate progress (completed years). Border added to track for visibility.
WCAG: 1.4.11 Non-text Contrast (Level AA), 1.4.1 Use of Color (Level A)
Footer Readability / Spacing
Files: footer.html
Change: Footer text split into two spans in a flex row with increased gap (sm:gap-8) so the funding statement and accessibility link don't visually run together at full width.
WCAG: 1.4.8 Visual Presentation (Level AAA) / readability best practice
Meta / Social Sharing
Files: twitter-card.html, config.yaml
Change: Added Open Graph meta tags alongside Twitter cards, added a site-wide description param, and consolidated duplicated Twitter card logic. Not strictly WCAG, but improves content accessibility when shared on social platforms.
Sustainability changes include: