Skip to content

fix(typings): add ARIA locators to ILocator - #5665

Merged
DenysKuchma merged 1 commit into
codeceptjs:4.xfrom
patryk-przybysz:fix/ilocator-role-types
Jul 30, 2026
Merged

fix(typings): add ARIA locators to ILocator#5665
DenysKuchma merged 1 commit into
codeceptjs:4.xfrom
patryk-przybysz:fix/ilocator-role-types

Conversation

@patryk-przybysz

Copy link
Copy Markdown
Contributor

Motivation/Description of the PR

ARIA locators ({ role: 'button', text: 'Submit' } / { role: 'button', name: 'Login' }) work at runtime since #5260 and are documented in docs/locators.md, but CodeceptJS.ILocator never included them - TypeScript reports TS2353: 'role' does not exist in type 'ILocator'.

Adds:

| { role: string; name?: string; text?: string; exact?: boolean }

Optional text / exact match the acceptance tests and WebDriver; name matches the docs and Playwright/Puppeteer.

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium

Applicable plugins:

  • aiTrace
  • autoDelay
  • autoLogin
  • customLocator
  • pause
  • coverage
  • heal
  • retryFailedStep
  • screenshot
  • selenoid
  • stepTimeout
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 🧹 Chore
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

ARIA locators have worked since codeceptjs#5260 and are documented, but the
hand-maintained ILocator union never included them.
@DenysKuchma
DenysKuchma merged commit 42f3d88 into codeceptjs:4.x Jul 30, 2026
11 of 15 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