Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support aria roleDescription in contentEditables #11607

Merged
merged 2 commits into from Sep 16, 2020

Conversation

michaelDCurran
Copy link
Member

Link to issue number:

None

Summary of the issue:

Web authors can override the way a screen reader announces the role for an element, by providing the aria-role-description attribute.
This has been supported in NVDA's browse mode and NVDAObjects (via the roleText property) for some time, but was accidentally left out of compoundDocuments, and therefore contenteditables.
Editors such as Google Docs may want to expose more specific role descriptions on images (E.g. drawing).

Test case:

data:text/html,<div contenteditable="true"><p>Start <img aria-roledescription="drawing" alt="NV Access logo" src="https://www.nvaccess.org/images/logo.png" /> end</p></div>

Description of how this pull request fixes the issue:

CompoundDocumentTextInfo._getControlFieldForObject: add the roleText property to the controlField.

Testing performed:

In both Firefox and Chrome:

  • Loaded the above html fragment.
  • Switched to focus mode.
  • Ensured that NVDA read the current line as "start drawing NV Access logo end". Previously it was "start graphic NV Access logo end".

Known issues with pull request:

None.

Change log entry:

Bug fixes:

  • NVDA honors the aria-roledescription attribute on elements in editable content in web pages.

LeonarddeR
LeonarddeR previously approved these changes Sep 15, 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.

None yet

3 participants