You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: role="textbox" should be preserved in read-only mode #7500
When a Lexical editor is read-only, its root <div contenteditable>dropsrole="textbox".
Playwright’s locator.fill() (and any API depending on the same autowait logic) rejects the element and throws:
Element is not an <input>, <textarea>, <select> or [contenteditable]
and does not have a role allowing [aria-readonly]
Every editor instance starts in this transient read-only state for a split second during initialisation, so tests frequently stumble over the error even though the editor soon becomes editable.
role="textbox" is removed while aria-readonly="true" is present.
Playwright (and assistive tech relying on ARIA roles) no longer recognises the element as a textbox, so autowait in locator.fill() aborts with the error shown above.
The expected behavior
role="textbox" should remain on the element regardless of aria-readonly.
With both attributes (role="textbox" aria-readonly="true"), Playwright can interact or wait safely, and assistive technologies keep the correct semantic.
Impact of fix
Severity : breaks E2E suites that use Playwright on apps built with Lexical, makes tests flaky.
Beneficiaries : Any developers/components/tests that rely on Playwright autowait, plus users of assistive technology (WCAG recommends keeping the role and toggling only aria-readonly).
Activity
etrepum commentedon Apr 29, 2025
Looks like this was changed in #6381 for some reason, @zurfyx?
so99ynoodles commentedon Jun 21, 2025
any progress on this?
@zurfyx