refactor: Update alt-text-generation e2e selectors to use ARIA roles#828
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #828 +/- ##
==========================================
Coverage 75.50% 75.50%
Complexity 2086 2086
==========================================
Files 99 99
Lines 8626 8626
==========================================
Hits 6513 6513
Misses 2113 2113
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What, Why, and How?
Part of #778
This PR updates the alt-text-generation E2E tests (
tests/e2e/specs/experiments/alt-text-generation.spec.js) to follow Playwright's recommended best practices. It replaces brittle CSS selectors and DOM structure-dependent locators with resilient, user-facing locators such asgetByRole,getByText, and other accessibility-based queries.Changes
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Sonnet 4.6
Used for: Code review, PR description
Testing Instructions
Verify that CI passes, or run the updated E2E test locally:
Changelog Entry