Skip to content

Axe core test revisions page - #13682

Open
afercia wants to merge 22 commits into
WordPress:trunkfrom
afercia:axe-core-test-revisions-page
Open

afercia wants to merge 22 commits into
WordPress:trunkfrom
afercia:axe-core-test-revisions-page

Conversation

@afercia

@afercia afercia commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

See https://core.trac.wordpress.org/ticket/66015

Branched out from #13348

As promised to @joedolson , here's a quick PR to test the Axe-core checks on the Revisions page.
This PR isn't meant ot be merged. It is just aimed to validate an integrate accessibility issues findings on the Revisions page.

What it does:

  • Creates a post with 3 revisions by adding 3 blocks and saving the post as draft each time.
  • Accesses the Revisions and scans it for violations.
  • Makes the page display the previous revision.
  • Scans the page again.

I will post the reported violations in a following comment.

To run the test:

  • Run npm install.
  • Run npm run test:e2e -- tests/e2e/specs/accessibility.spec.js to get the violations report in your terminal.
  • Or append the --ui flag to run the Playwright GUI:
    • npm run test:e2e -- tests/e2e/specs/accessibility.spec.js --ui
    • Once the GUI starts, click the Play button highlighted in the screenshot below.
    • Once the scan is complete, you can hover each step of the 2 tests to display the state of the UI at that time.
Screenshot 2026-09-23 at 12 33 56

Use of AI Tools


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props afercia.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@afercia

afercia commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

Reported violations:

First test: 1 violation:

--- Violation #1 ---
Rule ID:   nested-interactive
Impact:    SERIOUS
Failure:   Ensure interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies
Help:      Interactive controls must not be nested
Help link: https://dequeuniversity.com/rules/axe/4.13/nested-interactive?application=playwright
Failing elements:
  - Target Selector: html > body > #wpwrap > #wpcontent > #wpbody > #wpbody-content > .block-editor > #editor > ._0ebd6d9bf8b95794__wrapper > div > .components-snackbar-list > div > .components-snackbar-list__notice-container > .components-snackbar
  - HTML Snippet:
<div class="components-snackbar" tabindex="0" role="button" aria-label="Dismiss this notice" data-testid="snackbar">



Second test: 4 violations:

--- Violation #1 ---
Rule ID:   aria-allowed-role
Impact:    MINOR
Failure:   Ensure role attribute has an appropriate value for the element
Help:      ARIA role should be appropriate for the element
Help link: https://dequeuniversity.com/rules/axe/4.13/aria-allowed-role?application=playwright
Failing elements:
  - Target Selector: html > body > #wpwrap > #wpcontent > #wpbody > #wpbody-content > .block-editor > #editor > ._0ebd6d9bf8b95794__wrapper > div > .editor-editor-interface > .interface-interface-skeleton__editor > .interface-interface-skeleton__body > .interface-interface-skeleton__content > .editor-revisions-canvas__content > .editor-visual-editor > .components-resizable-box__container > div:nth-child(1) > .block-editor-iframe__container > .block-editor-iframe__scale-container > iframe, html > body > .editor-visual-editor__post-title-wrapper > h1
  - HTML Snippet:
<h1 contenteditable="false" class="wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text" aria-label="Add title" role="textbox" aria-multiline="true" style="white-space: pre-wrap;">


--- Violation #2 ---
Rule ID:   aria-input-field-name
Impact:    SERIOUS
Failure:   Ensure every ARIA input field has an accessible name
Help:      ARIA input fields must have an accessible name
Help link: https://dequeuniversity.com/rules/axe/4.13/aria-input-field-name?application=playwright
Failing elements:
  - Target Selector: html > body > #wpwrap > #wpcontent > #wpbody > #wpbody-content > .block-editor > #editor > ._0ebd6d9bf8b95794__wrapper > div > .editor-editor-interface > .interface-interface-skeleton__editor > .interface-interface-skeleton__body > .interface-interface-skeleton__sidebar > .interface-complementary-area__fill > #edit-post\:document > .editor-sidebar__panel > #base-ui-\:r1h\: > .editor-post-revisions-timeline > .dataviews-picker-wrapper > .dataviews-layout__container > .dataviews-view-picker-activity
  - HTML Snippet:
<div role="listbox" aria-multiselectable="false" aria-busy="false" class="dataviews-view-picker-activity" tabindex="0" aria-activedescendant=":r8u:">


--- Violation #3 ---
Rule ID:   color-contrast
Impact:    SERIOUS
Failure:   Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
Help:      Elements must meet minimum color contrast ratio thresholds
Help link: https://dequeuniversity.com/rules/axe/4.13/color-contrast?application=playwright
Failing elements:
  - Target Selector: html > body > #wpwrap > #wpcontent > #wpbody > #wpbody-content > .block-editor > #editor > ._0ebd6d9bf8b95794__wrapper > div > .editor-editor-interface > .interface-interface-skeleton__editor > .interface-interface-skeleton__body > .interface-interface-skeleton__sidebar > .interface-complementary-area__fill > #edit-post\:document > .editor-sidebar__panel > #base-ui-\:r1h\: > .editor-post-revisions-timeline > .dataviews-picker-wrapper > .dataviews-layout__container > .dataviews-view-picker-activity > #\:r92\: > ._19ce0419607e1896__stack > .dataviews-view-picker-activity__item-content._19ce0419607e1896__stack > .dataviews-view-picker-activity__item-description > .editor-post-content-information > .components-truncate.css-tf28v4-Text-base-textStyles.components-text
  - HTML Snippet:
<span data-wp-c16t="true" data-wp-component="Text" class="components-truncate css-tf28v4-Text-base-textStyles components-text">2 words, 1 minute read time.</span>
  - Target Selector: html > body > #wpwrap > #wpcontent > #wpbody > #wpbody-content > .block-editor > #editor > ._0ebd6d9bf8b95794__wrapper > div > .editor-editor-interface > .interface-interface-skeleton__editor > .interface-interface-skeleton__body > .interface-interface-skeleton__sidebar > .interface-complementary-area__fill > #edit-post\:document > .editor-sidebar__panel > #base-ui-\:r1h\: > .editor-post-revisions-timeline > .dataviews-picker-wrapper > .dataviews-layout__container > .dataviews-view-picker-activity > #\:r92\: > ._19ce0419607e1896__stack > .dataviews-view-picker-activity__item-content._19ce0419607e1896__stack > .dataviews-view-picker-activity__item-fields > .dataviews-view-picker-activity__item-field > .dataviews-view-picker-activity__item-field-value > ._3896336788892095__items-row.cc39999a5fb580d4__expanded-row[data-wp-component="HStack"] > .fields-controls__author-name
  - HTML Snippet:
<span class="fields-controls__author-name">admin</span>


--- Violation #4 ---
Rule ID:   nested-interactive
Impact:    SERIOUS
Failure:   Ensure interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies
Help:      Interactive controls must not be nested
Help link: https://dequeuniversity.com/rules/axe/4.13/nested-interactive?application=playwright
Failing elements:
  - Target Selector: html > body > #wpwrap > #wpcontent > #wpbody > #wpbody-content > .block-editor > #editor > ._0ebd6d9bf8b95794__wrapper > div > .components-snackbar-list > div > .components-snackbar-list__notice-container > .components-snackbar
  - HTML Snippet:
<div class="components-snackbar" tabindex="0" role="button" aria-label="Dismiss this notice" data-testid="snackbar">


@afercia
afercia force-pushed the axe-core-test-revisions-page branch from 92509db to b5c50be Compare September 24, 2026 12:27
@afercia
afercia force-pushed the axe-core-test-revisions-page branch from b5c50be to 512a760 Compare September 24, 2026 12:28
@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant