[docs] Refine section about accessibility impact of using XPath or CSS selectors in Behat#1573
Merged
andrewnicols merged 1 commit intomoodle:mainfrom Apr 19, 2026
Merged
Conversation
✅ Deploy Preview for moodledevdocs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
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/InvalidExampleblocks showing preferred vs discouraged steps. - Adds concrete Behat step examples demonstrating named selectors/labels vs XPath/CSS selectors.
…S selectors in Behat
203f17a to
3c81fd7
Compare
andrewnicols
approved these changes
Apr 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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