Skip to content

Chrome: Don't announce 'list' on every line of ul, dl and ol tags in contenteditables#11605

Merged
michaelDCurran merged 10 commits into
masterfrom
i7562
Sep 16, 2020
Merged

Chrome: Don't announce 'list' on every line of ul, dl and ol tags in contenteditables#11605
michaelDCurran merged 10 commits into
masterfrom
i7562

Conversation

@michaelDCurran

@michaelDCurran michaelDCurran commented Sep 14, 2020

Copy link
Copy Markdown
Member

Link to issue number:

Fixes #7562

Summary of the issue:

When arrowing up and down a ul, dl or ol list in Google Chrome, 'list' is announced on every line, and no announcement is made when leaving the list.
This can be reproduced when reading through a list in a Google Docs document in Chrome.
Or by the following test case in Chrome:

data:text/html,<div contenteditable="true"><p>start</p><ul><li>frogs</li><li>birds</li></ul><p>end</p></div>

This is because NVDA treats interactive and presentational lists differently. Interactive lists (such as <select> of size greater 1 and ARIA list boxes) it assumes only one line (value) is rendered, and thus it announces list on the line. But for presentational lists (ul, dl and ol tags), it announces list at the start, and out of list at the end.
NVDA normally detects presentation lists from interactive lists by the readonly state. Presentation lists have this, interactive lists don't.

However, if a presentation list is within a contenteditable, Chrome seems to remove the readonly state. Note that Mozilla Firefox does not remove it and thus does not reproduce the issue.

There was a request for this to be fixed on the Chrome side, but as this is taking a long time and the change in NVDA is small, we should do it here also.

Description of how this pull request fixes the issue:

Adds a new PresentationList NVDAObject class to Chrome IAccessibles for ul, dl and OL tags, and forces the readonly state.

Testing performed:

  • Arrowed up and down a list in Google Docs in Chrome and confirmed that list is no longer announced on every line.
  • Arrowed down past a <select> tag of size 2 in Chrome in browse mode and confirmed that it is still announced as an interactive list.

Known issues with pull request:

None.

Change log entry:

Bug fixes:

  • 'list' is no longer announced on every line of a list in Google Docs in Chrome.

…at 'list' is not announced on every line when in a contenteditable.
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 7da2b4ebb1

)
# Tab into the contenteditable - focus mode will be enabled.
spy.emulateKeyPress("tab")
# DownArow into the list. 'list' should be announced when entering.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Typo

Suggested change
# DownArow into the list. 'list' should be announced when entering.
# DownArrow into the list. 'list' should be announced when entering.

Comment thread tests/system/robot/chromeTests.py Outdated
Comment thread tests/system/robot/chromeTests.py Outdated
Comment thread source/NVDAObjects/IAccessible/chromium.py Outdated
…rather than buttons. They no longer need to be focusable as we use f6 not tab.
…ion, which then means that switching between browse and focus modes produces a spoken string we can check for.
…sure we don't accidentally test in browse mode.
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 771e37bc79

feerrenrut
feerrenrut previously approved these changes Sep 16, 2020
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.

Chrome: "list" is reported on every line of a list in rich text editors

5 participants