Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#29815 closed defect (bug) (fixed)

Text editor content not accessible for screen readers

Reported by: afercia's profile afercia Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.1 Priority: normal
Severity: normal Version: 4.0
Component: Editor Keywords: has-patch needs-testing
Focuses: accessibility, javascript Cc:


Investigating on what's been reported on IRC by @_Redd

Strange, I find that NVDA will "read" what's in the TinyMCE editor for the visual tab, but not the text one. It will read what you're typing in, of course, but it won't read what's already there. Pretty bad scenario.

and of course that's true and I could reproduce testing with Chrome and NVDA.

Turns out that when TinyMCE is initialized, it adds an attribute aria-hidden="true" to the textarea. Of course this doesn't happen when TinyMCE is not initialized yet, when on page load the active editor is the "Text" one. It will when you switch to "Visual" and switch back to "Text".
At this point, the "Text" editor textarea content is hidden for screen-readers.

When switching to the "Text" editor, the aria-hidden attribute needs to be set to "false" and then set back to "true" when switching to the "Visual" editor. See proposed attached patch.

Attachments (1)

29815.patch (674 bytes) - added by afercia 10 years ago.

Download all attachments as: .zip

Change History (10)

10 years ago

#1 follow-up: @afercia
10 years ago

  • Keywords has-patch needs-testing added

#2 in reply to: ↑ 1 @sharonaustin
10 years ago

Replying to afercia: Amazing insight into the problem--the explanation is greatly appreciated--as of course, is the patch.

This patch worked for me using Firefox 32.0.3 NVDA 2013.3. NVDA read out loud the content that was previously unseen by NVDA in the "Text Editor"---but further testing is required, there is some level of inconsistency with the sequence of steps I can't track down.

  1. It would read content in the Text Editor of the TinyMCE after the page was updated.
  2. If I clicked by mouse to the Text Editor, I would then have to click to the editor, and NVDA would read the first of two paragraphs, but not the second one.
  3. The same thing "seems" to be true when I tab to the Text Editor field, also (using the backwards tabbing thing)

Example of what I'm talking about (In the "Text Editor" Screen of the TinyMCE editor):
This page:
NVDA reads the first text, all the hyperlink information, but not "A paragraph", "A second paragraph", or "A third paragraph"

So, great success, but I don't think it is quite complete success yet. Thanks so much for the patch!

#3 follow-up: @sharonaustin
10 years ago

One follow-up; it occurred to me as I was going home last night that the patch may well be perfect--that the possible reason not all is read in the content area of the TinyMCE "Text Editor" may be because of NVDA, not WordPress or your patch.

Definitely, more testing is needed--other browsers, other versions of NVDA, other screen readers.

Thanks again, afercia, for the amazing insight into the problem, and the amazing patches.

#4 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.1

#5 @SergeyBiryukov
10 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 29815:

When switching to the Text editor, make the textarea visible to screen readers.

props afercia.
fixes #29815.

#6 in reply to: ↑ 3 @afercia
10 years ago

Replying to sharonaustin:

Thanks again, afercia, for the amazing insight into the problem, and the amazing patches.

Thanks Sharon :) for your feedback, enthusiasm and your nice words.

#7 @boonebgorges
9 years ago

In 30107:

In get_terms(), do not override 'hierarchical' and 'pad_counts' when 'parent' is present.

The previous behavior resulted in descendant terms being improperly excluded
from the results when passing a 'parent', even when 'hierarchical' had been
set to true.

The patch also adds unit tests that demonstrate the various interactions
between the 'child_of', 'parent', and 'hierarchical' parameters of get_terms().

Props landakram.
Fixes #29815.

#8 @jeremyfelt
9 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening due to accidental mis-tag on the commit from #29185

#9 @joedolson
9 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

The 29185 tagging was an error, but this ticket is actually closed from the previous #29815 tagging. Re-closing. :)

Note: See TracTickets for help on using tickets.