Skip to content

Visual Revisions: Accessibility #77530

Open
Open

Description

@joedolson

Description

@BluePraise and I reviewed the accessibility of the visual revisions feature during the accessibility bug scrub on April 21st, and found several accessibility issues to address.

Accessibility issues that need to be fixed for 7.0:

Accessibility issues that were not consistent:

  • Revisions State: Exiting or Restoring actions inconsistently announced confirmations. Some of the time the state change was announced, sometimes it wasn't; at least once, the state change announcement was immediately interrupted by a block receiving focus. This made me feel like there was a bug of some sort applying to focus assignment after leaving revisions. One observation is that the change is being announced using a polite announcement, and I think that assertive would be better.

Accessibility issues that are more iterative improvements:

  • Diff marker navigation region: The name of the region should be more user friendly, e.g. "Document Changes" instead of "Diff markers", which is very much a technical term.
  • Editor: Inline edits use the title attribute to communicate to screen readers. This works, but will have somewhat inconsistent support, since screen readers may ignore it in low-verbosity modes. Using something like aria-describedby pointing to a container would be more reliable. (title is mapped to an aria description in the accessibility tree).
  • Editor: The editor inconsistently marks up groups of words vs. individual words. E.g., if you've edited several words in a row, it may group them all, group some of them, or have all of them individually in separate del or ins elements. I couldn't figure out why during my testing. However, when they are separate, they significantly increase verbosity for screen reader users. Editor: Merge adjacent revision inline diffs #80579
  • Diff marker navigation region: It is difficult to navigate to this region using the keyboard, as it is placed after the content editor in the DOM order. It may be helpful to either move the region to be in the DOM before the content editor or add a link to shift position from the revision selection slider to the nav region.

Step-by-step reproduction instructions

  1. Create a post, and iterate it several times to create revisions.
  2. Navigate through the cited features using keyboard and a screen reader.

Screenshots, screen recording, code snippet

No response

Environment info

  • WP 7.0-RC2-62242
  • Gutenberg 22.9.0

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Activity

  1. added
    [Type] Bug
    [Focus] Accessibility (a11y)
    on Apr 21, 2026
  2. added theissue type on Apr 21, 2026
  3. added
    [Feature] History
    on Apr 21, 2026
  4. moved this from 📥 Todo to 📋 Iteration/Tracking Issues in WordPress 7.0 Editor Taskson Apr 22, 2026
  5. added
    [Status] In Progress
    on Apr 22, 2026
  6. joedolson commented on Apr 24, 2026

    @joedolson
    ContributorAuthor

    Linked to https://core.trac.wordpress.org/ticket/65122 to have tracking in core trac, as well.

  7. himanshupathak95 commented on Apr 30, 2026

    @himanshupathak95
    Contributor

    Diff markers navigation region: Only uses color to distinguish between removed, added, and edited blocks; should also have some secondary indicator.

    I was working on this, and I think this needs some design decisions to move forward.

    The approach I have in mind uses CSS repeating-linear-gradient stripes:

    • Added → solid fill (unchanged; green is universally "new")
    • Removed → 45° diagonal stripes (↗, classic "struck-out" cue)
    • Modified → -45° counter-diagonal stripes (↘, distinct from removed)

    This works without new assets or markup changes, scales to any marker height, and remains distinguishable in grayscale/color-blind simulation. Alternative approaches, like icons, dot patterns, hatching, would require widening the minimap and restructuring button markup. Please confirm whether this approach matches the direction we wish to move forward in.

  8. joedolson commented on Apr 30, 2026

    @joedolson
    ContributorAuthor

    @himanshupathak95 That seems like a reasonable choice to me. They only need to be clearly different; and with only three patterns to distinguish, those would seem sufficient to me.

  9. t-hamano commented on May 11, 2026

    @t-hamano
    Contributor

    Another critical issue: when clicking on a revision number to open the visual revision editor, the focus is lost. Where should the focus be moved to in this case?

    Recording.2026-05-11.113328.mp4
  10. t-hamano commented on May 11, 2026

    @t-hamano
    Contributor

    Editor: Removed images only have a color overlay; this could be ambiguous, if other images in the page use similar overlays, particularly for color blindness. Adding an icon or a more distinctive pattern would be helpful.

    @WordPress/gutenberg-design, do you have any ideas on how to solve this problem? Deleted images are displayed as follows on the revision page. Indeed, they can be indistinguishable from images with overlays.

    Image
  11. jameskoster commented on May 11, 2026

    @jameskoster
    Contributor

    What about applying the diagonal striped pattern from the scrollbar to the overlay? I'm not sure how that would look... it might be too much. No good ideas are springing to mind 😕

  12. moved this from 📋 Iteration/Tracking Issues to 📥 Todo in WordPress 7.0 Editor Taskson May 11, 2026
  13. 18 remaining items

  14. t-hamano commented on May 18, 2026

    @t-hamano
    Contributor

    Thanks for working on this, @himanshupathak95! Can you submit a PR so we can review and test it?

  15. himanshupathak95 commented on May 18, 2026

    @himanshupathak95
    Contributor

    Thanks for working on this, @himanshupathak95! Can you submit a PR so we can review and test it?

    Yes, absolutely! I'll be shortly opening a PR for this.

  16. moved this from 📥 Todo to 🐛 Punted to 7.0.1 in WordPress 7.0 Editor Taskson May 19, 2026
  17. himanshupathak95 commented on May 27, 2026

    @himanshupathak95
    Contributor

    when clicking on a revision number to open the visual revision editor, the focus is lost. Where should the focus be moved to in this case?

    Thanks for bringing this up. I also noticed this quite a few times and did some work on this.

    Regarding where focus should move:

    This is a violation of WCAG 2.4.3 Focus Order.

    I think the focus should shift to the revision slider itself, since it's the primary control in the revision editor. Screen reader users will hear the slider role and value, which is actionable. Or maybe we can add a visually hidden element at the top of the revision editor container like "Revision editor" and move focus to it on open. This gives screen reader users immediate context about the view change.

    I'm gonna defer to the experts' jusdgement on this one.

  18. himanshupathak95 commented on May 29, 2026

    @himanshupathak95
    Contributor

    While testing the visual revisions canvas against the block visibility feature, I ran into behaviors that seem relevant to the
    accessibility work here.

    1. Hidden blocks are completely absent from the revision canvas

    When a block has metadata.blockVisibility: false (hidden via the Hide option), it renders nothing in the revision canvas, no outline, no placeholder, no indicator of any kind. A user reviewing revisions has no way to know a block was hidden in that revision, either visually or via assistive technology. This compounds the block-level aria-label gap already noted above (WIP #77779), since there's no element to attach a label to in the first place.

    1. Breakpoint-based hidden blocks are destroyed in the mobile viewport

    If a block is set to hide on mobile and the revision canvas is switched to mobile viewport, the block is removed from the DOM entirely, exactly as it would be on the live site. The revision canvas is not suspending viewport visibility rules during diff review, which means the diff indicators for those blocks also disappear. This feels like a bug independent of
    accessibility, since revision review should provide a neutral audit view regardless of the configured visibility state.

    I think I'll be opening a separate issue to cover these more broadly, since the scope goes beyond the accessibility audit into diff logic and canvas rendering behavior, but still flagging here.

  19. jasmussen commented on Jun 1, 2026

    @jasmussen
    Contributor

    Hidden blocks are completely absent from the revision canvas

    I've filed #76996 with some proposals for how to make this clear.

  20. joedolson commented on Jun 2, 2026

    @joedolson
    ContributorAuthor

    @himanshupathak95 @t-hamano It's generally preferable not to move focus unless either

    1. The control you're using is clearly intending to change focus (e.g. links are always expected to move focus) or
    2. The control you're using will no longer be visible after you click it.

    In this case, the control is no longer available, so a focus move is necessary. I agree that the logical focus move is to the revisions slider, as opening the revisions editor is only the first step in the process; unless you know that you want to review the last revision, you'll need to select a revision first.

  21. t-hamano commented on Aug 13, 2026

    @t-hamano
    Contributor

    Let's consider fixing the remaining issues in the 7.2 release.

  22. moved this to 📋 Iteration/Tracking Issues in WordPress 7.2 Editor Taskson Aug 13, 2026
  23. anamwp commented on Aug 31, 2026

    @anamwp
    Contributor

    PR #82258 addresses the "Color contrast of marked del" item.

    It stops routing inline removed text through the #revision-removed-filter colour matrix (which desaturates, red-tints, and drops alpha to 0.8, so the rendered contrast depended on the theme's background and couldn't be guaranteed). Inline <del> now keeps the theme's body text colour with a red-tinted background and red strike, mirroring how inline <ins> already works. The desaturating filter is unchanged for removed blocks and images.

  24. anamwp commented on Sep 1, 2026

    @anamwp
    Contributor

    @joedolson @t-hamano
    I'd like to take the last "Diff marker navigation region" item — the one about the region being difficult to reach by keyboard because it sits after the content editor in the DOM order.

    • Diff marker navigation region: It is difficult to navigate to this region using the keyboard, as it is placed after the content editor in the DOM order. It may be helpful to either move the region to be in the DOM before the content editor or add a link to shift position from the revision selection slider to the nav region.

    Of the two options in the description, I'm leaning toward the link from the revisions slider rather than moving the region ahead of the content editor. Reordering changes tab order for everyone and sits close to the focus handling added in #79691, whereas a link adds a route to the region without altering what's already there.

    The region itself already has role="navigation" and an accessible name from #77660, so this looks like it's only about reachability.

    Happy to go the DOM-order route instead if that's preferred — I'll hold off until there's a steer.

  25. mattcowan commented on Oct 14, 2026

    @mattcowan
    Contributor

    I found a keyboard problem in the revision canvas that is not in the list above. In Chromium, with the steps in #84577, Tab does not get past the modified Paragraph block: focus moves to the canvas body, and the next Tab goes back to the first block. Keyboard users cannot reach the rest of the canvas, the "Document changes" region, or the sidebar. Firefox is not affected. #84578 fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] History[Focus] Accessibility (a11y)[Status] In Progress[Type] Bug

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions