Case ce-0574 · Scenario scenario-accessibility-foundations

aria-readonly conflicts with contenteditable state

OS: Windows 11 Device: Desktop Any Browser: Chrome 124.0 Keyboard: US QWERTY Status: confirmed
accessibility aria readonly screen-reader chrome-124

Phenomenon

A conflict exists in Chromium’s Accessibility implementation where legacy ARIA attributes can override or mangle the state derived from the contenteditable attribute. Specifically, when a developer explicitly sets aria-readonly="false" (often done to be safe or when toggling states dynamically), Chrome sometimes internalizes this flag in a way that suggests a restricted state to the macOS and Windows Accessibility APIs. This leads screen readers like NVDA to announce the field as “read only” even though the user can type into it.

Reproduction Steps

  1. Create an element with contenteditable="true" and role="textbox".
  2. Add the attribute aria-readonly="false".
  3. Open Chrome (v122 - v124).
  4. Start a screen reader like NVDA or JAWS.
  5. Tab focus into the editor.
  6. Listen for the initial announcement.

Observed Behavior

  1. Screen Reader Voice: NVDA says “Type here, Edit, Read only.”
  2. User Confusion: The user is told the field is read-only, so they may stop trying to input text, despite the caret being active and blinking.
  3. Accessibility Tree: The readonly bit in the platform-specific accessibility node (e.g., IA2 on Windows) is set to true incorrectly.

Expected Behavior

The contenteditable="true" state should define the primary editing capability. aria-readonly="false" should be redundant or ignored, and aria-readonly="true" should only take effect if the contenteditable attribute is also set to false.

Impact

  • Non-Standard Workflow: Users who rely on screen readers are misled about the interactability of the application.
  • Dynamic State Failure: Applications that toggle between “Read Mode” and “Edit Mode” via ARIA attributes experience “ghost” read-only states that persist after the user enters edit mode.

Browser Comparison

  • Chrome 124: Confirmed conflict in certain Shadow DOM and Custom Element scenarios.
  • Firefox: Correctly prioritizes the editable state; ignores aria-readonly="false".
  • Safari: Generally consistent with ARIA mappings but has other role="textbox" challenges.

References & Solutions

Mitigation: Avoid aria-readonly on Editable regions

Unless you are explicitly in a non-editable state, do not include the aria-readonly attribute at all. Use the presence or absence of the contenteditable attribute to signal the state to the browser.

function setEditMode(isEditable) {
    const editor = document.getElementById('editor');
    editor.contentEditable = isEditable ? 'true' : 'false';
    // REMOVE aria-readonly instead of setting to false
    if (isEditable) {
        editor.removeAttribute('aria-readonly');
    } else {
        editor.setAttribute('aria-readonly', 'true');
    }
}
Step 1: Setup Custom Box
|
Initialize a custom edit box. aria-readonly is explicitly set to false to encourage accessibility.
Step 2: Bug Announcement
Despite aria-readonly='false', the Accessibility Tree combines state flags in a way that signals 'read-only' to NVDA. NVDA announces: 'Edit, read only'.
vs
✅ Expected
|
Expected: Removing aria-readonly (or setting it to false) should never override the native 'read-write' state of a contenteditable element.

Browser compatibility matrix

This matrix shows which browser and OS combinations have documented cases for this scenario. The current case is highlighted. Click on a cell to view other cases.

Current case
Confirmed
Draft
No case documented

All variants (detailed table)

Complete list of all cases for this scenario with full environment details.

Case OS Device Browser Keyboard Status
ce-0015-screen-reader-announcements macOS Ubuntu 22.04 Desktop or Laptop Any Safari 120.0 US draft
ce-0041-spellcheck-interferes macOS Ubuntu 22.04 Desktop or Laptop Any Safari 120.0 US draft
ce-0054-contenteditable-with-aria macOS Ubuntu 22.04 Desktop or Laptop Any Safari 120.0 US draft
ce-0573 macOS 15.0 Desktop Any Chrome 129.0 US QWERTY confirmed
ce-0574 Windows 11 Desktop Any Chrome 124.0 US QWERTY confirmed

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Windows 11
Device: Desktop Any
Browser: Chrome 124.0
Keyboard: US QWERTY
Your environment
Sample HTML:
Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.

Comments & Discussion

Have questions, suggestions, or want to share your experience? Join the discussion below.