Skip to content

[docs] Refine section about accessibility impact of using XPath or CSS selectors in Behat#1573

Merged
andrewnicols merged 1 commit intomoodle:mainfrom
kabalin:MDL-74174
Apr 19, 2026
Merged

[docs] Refine section about accessibility impact of using XPath or CSS selectors in Behat#1573
andrewnicols merged 1 commit intomoodle:mainfrom
kabalin:MDL-74174

Conversation

@kabalin
Copy link
Copy Markdown
Collaborator

@kabalin kabalin commented Apr 19, 2026

Per discussion in architects meeting, 30th March 2026, we improve this section with examples in response to https://moodle.atlassian.net/browse/MDL-74174 policy suggestion.

Rendered section preview: https://deploy-preview-1573--moodledevdocs.netlify.app/general/development/tools/behat/writing#dont-use-xpath-or-css-selectors---fix-your-accessibility-bugs

Copilot AI review requested due to automatic review settings April 19, 2026 15:49
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 19, 2026

Deploy Preview for moodledevdocs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3c81fd7
🔍 Latest deploy log https://app.netlify.com/projects/moodledevdocs/deploys/69e50447cda16800089e070f
😎 Deploy Preview https://deploy-preview-1573--moodledevdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Moodle DevDocs guidance for writing Behat scenarios by refining the recommendation around avoiding XPath/CSS selectors, framing it as an accessibility-driven practice and adding “Do/Don’t” examples.

Changes:

  • Renames the guidance section to focus on avoiding selectors and addressing accessibility issues.
  • Replaces the previous narrative explanation with ValidExample / InvalidExample blocks showing preferred vs discouraged steps.
  • Adds concrete Behat step examples demonstrating named selectors/labels vs XPath/CSS selectors.

Comment thread general/development/tools/behat/writing.md Outdated
Comment thread general/development/tools/behat/writing.md Outdated
Comment thread general/development/tools/behat/writing.md Outdated
@kabalin kabalin force-pushed the MDL-74174 branch 2 times, most recently from 203f17a to 3c81fd7 Compare April 19, 2026 16:35
@andrewnicols andrewnicols added this pull request to the merge queue Apr 19, 2026
Merged via the queue into moodle:main with commit 4d17859 Apr 19, 2026
6 checks passed
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.

3 participants