Page MenuHomePhabricator

Image Browsing: Perform accessibility audit of the entire feature
Closed, ResolvedPublic5 Estimated Story Points

Assigned To
Authored By
egardner
Sep 16 2025, 5:26 PM
Referenced Files
F66843431: screenshot 309.png
Oct 24 2025, 3:54 AM
F66843424: screenshot 127.mov.gif
Oct 24 2025, 3:54 AM
F66841538: screenshot 126.mov.gif
Oct 24 2025, 3:54 AM
F66841357: screenshot 124.mov.gif
Oct 24 2025, 3:54 AM
F66841019: screenshot 123.mov.gif
Oct 24 2025, 3:54 AM
F66840054: screenshot 308.png
Oct 24 2025, 3:54 AM
F66840053: screenshot 305.png
Oct 24 2025, 3:54 AM
F66840052: screenshot 306.png
Oct 24 2025, 3:54 AM

Description

Some initial accessibility review of the Carousel component was performed in T400182. That work dealt mostly with alt text for images and keyboard navigation support.

As we approach the A/B test of this feature, we should perform a more in-depth accessibility review for the entire Image Browsing feature. This audit should include checking for the things listed at bottom:

More requirements may need to be added here as we discover them.

In general, any custom UI components we have introduced should follow the ARIA patterns guidelines as closely as possible:

https://www.w3.org/WAI/ARIA/apg/patterns/

Test steps:

  • Ensure all images throughout the UI include whatever meaningful alt text we can procure (we cannot add alt text which is not present in the source Wiki article, but whatever does exist we should make use of)
    • carousel images must have alt text
    • detail image must have alt text
    • visual toc images must have alt text
    • other-wikis images must have alt text
  • Ensure buttons and interactive elements are properly labeled
    • clickable images in carousel must be clickable under VoiceOver - FIXED
    • clickable images in carousel have meaningful aria label - "Select an image" - FIXED
    • clickable images in visual toc have meaningful aria label - missing! - FIXED
    • clickable images in other-wikis have meaningful aria label - missing! - FIXED
    • icon on detail view placeholder must have meaningful alt text or label - "Loading" on the covering placeholder div
    • overlay and detail view icons must have meaningful alt text or labels - "Close", "Toggle full, uncropped, image", "Share", "View on Commons", "Download"
    • widgets and icons in "share" mini-dialog should be clear
    • widgets and icons in "download" mini-dialog should be clear
    • announceable region on the image carousel - FIXED
    • announceable region on the overlay - FIXED
  • Ensure elements have appropriate ARIA attributes. We should pay special attention to the following:
    • The DetailView component should be treated as an aria-live region since the content here can dynamically update (link)
      • done in patch. includes aria-select on the active carousel image button, like recommended for a tab bar
    • The Overlay component should include the aria-modal attribute (link) - FIXED
    • Check visual contrast in things like the overlay component backdrop and text which appears above the color background in the DetailViewCaption component
    • Ensure the UI works properly in dark mode
      • background of carousel should be dark in dark mode
      • background of overlay scroll view should be dark in dark mode
      • icons on overlay/detail view should use dark mode theme in dark mode
      • text caption in detail view should remain dark or light based on the background color calculation, and should *not* change with dark/light mode
      • other text on standard backgrounds should use the appropriate text color
    • Ensure that buttons that scroll elements into view have proper labels
  • Ensure that keyboard navigation is consistent
    • tabbing through the carousel should work as expected
    • tabbing through the detail view and vtoc and work as expected - FIXED
    • esc should close the overlay when overlay is open and current context
    • closing the overlay should put the focus back on the image that most recently selected in the carousel? (also mentioned in T404155: Improve keyboard navigation) - FIXED
    • opening the share popover then tabbing/swiping fwd should select the text field, continuing to tab should go to the copy button, tabbing again should close the popover - FIXED
    • accessibility select, space or enter in the share popover's copy button should copy the URL - FAILS (does nothing, as does clicking in it!) - this doesn't seem to be an accessibility bug but just needs fixing
    • accessibility select, space, or enter while the resolution picker is focused should open it
    • tabbing in the download popover should get you to the resolution selector - FIXED
    • up/down then accessibility select/space/enter should select resolution (FAILS: up/down works but space/enter does nothing) -- this is not an accessibility bug, there's a problem with the controls! this is giving me a vue warning about read-only properties?
    • enter while the download button is selected should download
    • switching images with the overlay open should set focus so you can reach the controls - FAILS leaves focus on the button - FIXED setting focus manually for this case
  • Ensure the entire UI works well with assistive technology; this will require manual testing using something like JAWS or VoiceOver
    • test all interactions with keyboard on Chrome in dev tools testing - FIXED except for the broken form fields
    • test all interactions with VoiceOver on Mac/desktop Safari in mobile view - FIXED except for the broken form fields
    • test all interactions with VoiceOver on iPhone/mobile Safari

Requirement

Conduct a full accessibility audit of the Image Browsing feature, validating compliance with WCAG 2.1 AA standards and ARIA Authoring Practices. The audit must confirm correct alt text usage, proper labeling and roles, color contrast and dark mode behavior, consistent keyboard navigation, and assistive technology compatibility. All custom UI components (carousel, overlay, popovers, download/share widgets, and visual TOC) must meet accessibility expectations for both desktop and mobile environments.

BDD

Feature: Full accessibility compliance for Image Browsing feature

  Scenario: Verify Image Browsing components meet accessibility guidelines
    Given the Image Browsing feature is enabled on beta
    When a user navigates using assistive technologies or keyboard
    Then all images and interactive elements must have meaningful labels
    And contrast, ARIA roles, and keyboard focus must comply with WCAG and WAI-ARIA guidelines
    And the UI must function correctly in both light and dark modes across desktop and mobile

Test Steps

Test Case 1: Ensure all images include meaningful alt text

  1. Inspect all image contexts (carousel, detail view, visual TOC, and other-wikis)
  2. AC1: Carousel images have meaningful alt text from source or alt="" if decorative
  3. AC2: Detail image includes appropriate alt text
  4. AC3: Visual TOC images have descriptive alt text
  5. AC4: Other-wikis images have descriptive alt text
  6. AC5: Placeholder and icon-only elements in DetailView have meaningful aria-label (e.g., “Loading”, “Close”, “Toggle full image”, “Share”, “View on Commons”, “Download”)

Test Case 2: Ensure buttons and interactive elements are properly labeled

  1. Inspect all clickable images and buttons
  2. AC6: Clickable carousel images have aria-label="Select an image"
  3. AC7: Clickable images in visual TOC and other-wikis have descriptive ARIA labels
  4. AC8: Overlay and mini-dialog widgets (share/download) have labeled buttons and controls
  5. AC9: Popover buttons include accessible name and role attributes (copy/download actions operable via keyboard)

Test Case 3: Ensure visual contrast and dark mode behavior

  1. Test all visual contexts in both light and dark mode
  2. AC10: Overlay backdrops and text meet 4.5:1 contrast ratio
  3. AC11: Carousel and overlay backgrounds adapt to dark mode (darkened background, themed icons)
  4. AC12: Text captions remain legible (contrast calculated dynamically, not inverted incorrectly)
  5. AC13: All text on standard backgrounds uses correct theme color tokens

Test Case 4: Ensure keyboard navigation and focus behavior

  1. Navigate through the feature using Tab, Shift+Tab, Arrow keys, Enter, and Escape
  2. AC14: Tabbing through carousel, detail view, and visual TOC works sequentially
  3. AC15: Escape closes the overlay and restores focus to last selected carousel image
  4. AC16: Tab navigation in share popover cycles between text field → copy button → closes popover
  5. AC17: Resolution picker in download popover is focusable and operable via up/down + Enter/Space
  6. AC18: Focus correctly shifts when switching images inside overlay

Test Case 5: Ensure compatibility with assistive technologies

  1. Test the full feature using VoiceOver (macOS/iOS) and keyboard-only navigation
  2. AC19: All dynamic content updates announced via aria-live or equivalent region
  3. AC20: Overlay includes aria-modal="true" attribute
  4. AC21: Keyboard interaction fully supported in Chrome DevTools accessibility mode
  5. AC22: VoiceOver correctly reads all focusable elements and form controls on desktop and mobile Safari
  6. AC23: No blocking or silent failures when using assistive technology to interact with image controls

QA Results - Beta

ACStatusDetails
1 - 18T404743#11305132
19T404743#11305132
20-23T404743#11305132

Event Timeline

egardner added subscribers: lwatson, Edtadros, ovasileva.

From the Entry point task:

@Edtadros Thanks for flagging these issues! I've addressed questions regarding alternative text, responsiveness, and contrast ratio below.

Alt Text:

  • We anticipated limited translations in the prototype since localization typically happens later in the development cycle. Please let me know if this understanding is incorrect. cc: @ovasileva @egardner
  • The poor alternative text quality stems from our current fallback to image filenames when proper descriptions aren't available.
  • I'm surprised to see translation differences between Vector and Minerva skins for the same content. Is this expected behavior?

Responsive layout at 320px:

  • This criterion conflicts with the current design, though I don't have the full context on when/why this design decision changed.
  • I believe it may be outdated and this criterion was based on an earlier design iteration. The current implementation intentionally maintains horizontal scrolling at all viewport widths, allowing users to browse the full image gallery.
    • Gallery does not reflow at 320px (as originally specified).
    • Users can horizontally scroll to view additional images regardless of viewport size.

Overlay contrast ratio:
Note: The overlay falls outside this audit’s scope

  • Your visual assessment suggests adequate color contrast.
  • Axe and Lighthouse tools scan elements present at page load. This excludes the dynamically rendered overlay content.
  • I verified manually that:
    • Icon-only buttons include proper aria-label attributes. This refers to the Overlay close button and DetailView controls ( share, download, link to Commons, and fullscreen).
    • All interactive elements are keyboard accessible via tabbing.
    • Image alt text is present.
  • Next steps: File a follow-up task to investigate alternative tools further or inspect computed colors manually for confirmation. Verification is challenging because exact colors are not used in the overlay text and background.
ovasileva moved this task from Incoming/Inbox to Needs Refinement on the Reader Growth Team board.
HSwan-WMF set the point value for this task to 5.Sep 24 2025, 4:33 PM

Change #1192619 had a related patch set uploaded (by Bvibber; author: Bvibber):

[mediawiki/extensions/ReaderExperiments@master] WIP: Accessibility audit fixes

https://gerrit.wikimedia.org/r/1192619

Current state of the patch is:

  • provisional aria markup following carousel/slide pattern (not yet tested in VoiceOver)
  • fixed a couple missing labels in vtoc/other-wikis

Testing with VoiceOver on my iPhone and just poking everything until it starts working. ;)

  • Carousel clicks now work with VoiceOver on iPhone! (had to refactor how the enter workaround was done for desktop/keyboard)
  • Labels on the image buttons now include the alt text for the images, because the actual images' alt text was completely obscured by the surrounding button label!
  • in progress adding carousel and dialog markup roles
bvibber updated the task description. (Show Details)

Change #1192619 merged by jenkins-bot:

[mediawiki/extensions/ReaderExperiments@master] Accessibility audit fixes for iPhone

https://gerrit.wikimedia.org/r/1192619

Test wiki on [[ | Patch demo ]] by LWatson-WMF using patch(es) linked to this task was deleted:

https://6483020d06.catalyst.wmcloud.org/w/

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Sequoia 15.5
Browser: Chrome Canary (latest as of test date)
Device: MS
Emulated Device: NA

Test Case 1: Ensure all images include meaningful alt text

  1. Inspect all image contexts (carousel, detail view, visual TOC, and other-wikis)
  2. AC1: Carousel images have meaningful alt text from source or alt="" if decorative

screenshot 287.png (1×1 px, 981 KB)

  1. AC2: Detail image includes appropriate alt text

screenshot 288.png (1×1 px, 1 MB)

  1. AC3: Visual TOC images have descriptive alt text

screenshot 289.png (1×1 px, 1 MB)

  1. AC4: Other-wikis images have descriptive alt text

screenshot 290.png (1×1 px, 855 KB)

  1. AC5: Placeholder and icon-only elements in DetailView have meaningful aria-label (e.g., “Loading”, “Close”, “Toggle full image”, “Share”, “View on Commons”, “Download”)
LoadingClose”Toggle full imageShareView on CommonsDownload
screenshot 291.png (1×1 px, 256 KB)
screenshot 292.png (1×1 px, 2 MB)
screenshot 293.png (1×1 px, 2 MB)
screenshot 294.png (1×1 px, 2 MB)
screenshot 295.png (1×1 px, 2 MB)
screenshot 296.png (1×1 px, 2 MB)

Test Case 2: Ensure buttons and interactive elements are properly labeled

  1. Inspect all clickable images and buttons
  2. AC6: Clickable carousel images have aria-label="Select an image"

screenshot 297.png (1×1 px, 891 KB)

  1. AC7: Clickable images in visual TOC and other-wikis have descriptive ARIA labels

screenshot 298.png (1×1 px, 1 MB)

  1. AC8: Overlay and mini-dialog widgets (share/download) have labeled buttons and controls
screenshot 299.png (1×1 px, 2 MB)
screenshot 300.png (1×1 px, 2 MB)
screenshot 301.png (1×1 px, 2 MB)
screenshot 302.png (1×1 px, 2 MB)
  1. AC9: Popover buttons include accessible name and role attributes (copy/download actions operable via keyboard)

screenshot 121.mov.gif (1×1 px, 3 MB)

Test Case 3: Ensure visual contrast and dark mode behavior

  1. Test all visual contexts in both light and dark mode
  2. AC10: Overlay backdrops and text meet 4.5:1 contrast ratio
  3. AC11: Carousel and overlay backgrounds adapt to dark mode (darkened background, themed icons)
  4. AC12: Text captions remain legible (contrast calculated dynamically, not inverted incorrectly)
  5. AC13: All text on standard backgrounds uses correct theme color tokens

I couldn't get the WCAG Contrast Checker to work when I selected an image with text. Visually all elements and text look good. When I could get it to work there were no contrast values under 4.5 on the overlay.

screenshot 307.png (219×1 px, 362 KB)

screenshot 306.png (1×1 px, 1 MB)

screenshot 305.png (1×1 px, 2 MB)

screenshot 308.png (1×1 px, 2 MB)

Test Case 4: Ensure keyboard navigation and focus behavior

  1. Navigate through the feature using Tab, Shift+Tab, Arrow keys, Enter, and Escape
  2. AC14: Tabbing through carousel, detail view, and visual TOC works sequentially

screenshot 123.mov.gif (1×1 px, 3 MB)

  1. AC15: Escape closes the overlay and restores focus to last selected carousel image

See AC14

  1. AC16: Tab navigation in share popover cycles between text field → copy button → closes popover

See AC9

  1. AC17: Resolution picker in download popover is focusable and operable via up/down + Enter/Space

screenshot 124.mov.gif (1×1 px, 2 MB)

  1. AC18: Focus correctly shifts when switching images inside overlay

screenshot 126.mov.gif (1×1 px, 3 MB)

Test Case 5: Ensure compatibility with assistive technologies

  1. Test the full feature using VoiceOver (macOS/iOS) and keyboard-only navigation
  2. AC19: All dynamic content updates announced via aria-live or equivalent region

screenshot 127.mov.gif (1×1 px, 3 MB)

  1. AC20: Overlay includes aria-modal="true" attribute

screenshot 309.png (1×1 px, 2 MB)

  1. AC21: Keyboard interaction fully supported in Chrome DevTools accessibility mode

I wasn't sure how to validate this, but keyboard controls work in general for users outside of Chrome DevTools.

  1. AC22: VoiceOver correctly reads all focusable elements and form controls on desktop and mobile Safari

See AC 19

  1. AC23: No blocking or silent failures when using assistive technology to interact with image controls

See AC 19

Looks good, resolving!