Table block: the RichText within the table cells shouldn't have role=textbox and aria-multiline=true #12525
Closed
Description
opened on Dec 2, 2018
For all the usages of the RichText component within the various blocks, Gutenberg uses a role=textbox
and an aria-multiline=true
attribute to make the editable field perceived by assistive technologies as equivalent of a <textarea>
element.
The only exception used to be the Table block: a specific exception was coded a while ago:
gutenberg/packages/editor/src/components/rich-text/tinymce.js
Lines 356 to 364 in 68367b4
The rationale behind this exception is:
- all the other blocks editable areas need to be communicated to assistive technologies like a textarea (some doubts were expressed about the List block)
- instead, the Table block needs to keep the table native semantic, and the table cells need to be communicated as editable cells
This worked but the Table block and RichText have seen some refactoring over time and now seems it doesn't work any longer:
As a consequence, screen readers announce a textarea within a table cell, which is potentially confusing for users:
Activity